blob: ad2316a3023deb87ccfbf650fceb8fc09a1232fe [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
Steven Sombarfac31e92017-12-15 09:40:34 -06009Test Teardown Test Teardown Execution
George Keishing6c2ac912017-05-12 06:36:21 -050010
11*** Variables ***
12
13# User defined boot test iteration.
George Keishing329aac32017-06-05 12:03:26 -050014${BOOT_LOOP_COUNT} ${1}
George Keishing6c2ac912017-05-12 06:36:21 -050015
16*** Test Cases ***
17
18Host Reboot Loop
19 [Documentation] Boot OS and trigger reboot and expect
20 ... OS to boot back.
George Keishingd3166252018-10-24 12:10:27 -050021 [Tags] Host_Reboot_Loop
22
George Keishing6c2ac912017-05-12 06:36:21 -050023 # 1. Boot OS
24 # 2. Verify OS is booted
25 # 3. Issue "reboot" from OS
26 # 4. Verify if OS is booted back
27
George Keishing329aac32017-06-05 12:03:26 -050028 # By default run test for 1 loop, else user input iteration.
George Keishing6c2ac912017-05-12 06:36:21 -050029 # Fails immediately if any of the execution rounds fail.
30
31 # Note: Host Reboot is implemented by the OBMC Boot Test tool.
32 # OBMC Boot Test will take the necessary steps to get the OBMC
33 # to a host powered on state before attempting the Host Reboot.
George Keishinge523fc02020-03-23 12:28:01 -050034 Repeat Keyword ${BOOT_LOOP_COUNT} times RF SYS GracefulRestart
George Keishing6c2ac912017-05-12 06:36:21 -050035
36*** Keywords ***
George Keishing329aac32017-06-05 12:03:26 -050037
Steven Sombarfac31e92017-12-15 09:40:34 -060038Test Teardown Execution
George Keishing329aac32017-06-05 12:03:26 -050039 [Documentation] Do the post test teardown.
40 # 1. Capture FFDC on test failure.
41 # 2. Stop SOL logging.
42 # 3. Close all open SSH connections.
43
44 FFDC On Test Case Fail
45
46 ${keyword_buf}= Catenate Stop SOL Console Logging
47 ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
48 Run Key ${keyword_buf}
49
50 Close All Connections