blob: 9855787734f7a08defdc629870d750daccf5382a [file] [log] [blame]
George Keishing6c2ac912017-05-12 06:36:21 -05001*** Settings ***
2Documentation Module to test OS reboot functionality.
3
George Keishing60b5e612019-07-05 12:11:51 -05004Resource ../../lib/bmc_redfish_resource.robot
George Keishingaae72aa2019-07-05 11:56:49 -05005Resource ../../lib/openbmc_ffdc.robot
6Resource ../../lib/boot_utils.robot
George Keishing6c2ac912017-05-12 06:36:21 -05007
George Keishing329aac32017-06-05 12:03:26 -05008Suite Setup Run Key Start SOL Console Logging
ganesanb70aab072022-08-04 07:40:42 +00009Test Setup Redfish.Login
Steven Sombarfac31e92017-12-15 09:40:34 -060010Test Teardown Test Teardown Execution
George Keishing6c2ac912017-05-12 06:36:21 -050011
12*** Variables ***
13
14# User defined boot test iteration.
George Keishing329aac32017-06-05 12:03:26 -050015${BOOT_LOOP_COUNT} ${1}
George Keishing6c2ac912017-05-12 06:36:21 -050016
17*** Test Cases ***
18
19Host Reboot Loop
20 [Documentation] Boot OS and trigger reboot and expect
21 ... OS to boot back.
George Keishingd3166252018-10-24 12:10:27 -050022 [Tags] Host_Reboot_Loop
23
George Keishing6c2ac912017-05-12 06:36:21 -050024 # 1. Boot OS
25 # 2. Verify OS is booted
26 # 3. Issue "reboot" from OS
27 # 4. Verify if OS is booted back
28
George Keishing329aac32017-06-05 12:03:26 -050029 # By default run test for 1 loop, else user input iteration.
George Keishing6c2ac912017-05-12 06:36:21 -050030 # Fails immediately if any of the execution rounds fail.
31
32 # Note: Host Reboot is implemented by the OBMC Boot Test tool.
33 # OBMC Boot Test will take the necessary steps to get the OBMC
34 # to a host powered on state before attempting the Host Reboot.
George Keishinge523fc02020-03-23 12:28:01 -050035 Repeat Keyword ${BOOT_LOOP_COUNT} times RF SYS GracefulRestart
George Keishing6c2ac912017-05-12 06:36:21 -050036
37*** Keywords ***
George Keishing329aac32017-06-05 12:03:26 -050038
Steven Sombarfac31e92017-12-15 09:40:34 -060039Test Teardown Execution
George Keishing329aac32017-06-05 12:03:26 -050040 [Documentation] Do the post test teardown.
41 # 1. Capture FFDC on test failure.
42 # 2. Stop SOL logging.
43 # 3. Close all open SSH connections.
44
45 FFDC On Test Case Fail
46
47 ${keyword_buf}= Catenate Stop SOL Console Logging
48 ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
49 Run Key ${keyword_buf}
50
51 Close All Connections