blob: 9d46f9e4305bb8b8975df899436ab31dcf048104 [file] [log] [blame]
George Keishing6c2ac912017-05-12 06:36:21 -05001*** Settings ***
2Documentation Module to test OS reboot functionality.
3
4Resource ../lib/boot_utils.robot
George Keishing329aac32017-06-05 12:03:26 -05005Resource ../extended/obmc_boot_test_resource.robot
George Keishing6c2ac912017-05-12 06:36:21 -05006
George Keishing329aac32017-06-05 12:03:26 -05007Suite Setup Run Key Start SOL Console Logging
Steven Sombarfac31e92017-12-15 09:40:34 -06008Test Teardown Test Teardown Execution
George Keishing6c2ac912017-05-12 06:36:21 -05009
10*** Variables ***
11
12# User defined boot test iteration.
George Keishing329aac32017-06-05 12:03:26 -050013${BOOT_LOOP_COUNT} ${1}
George Keishing6c2ac912017-05-12 06:36:21 -050014
15*** Test Cases ***
16
17Host Reboot Loop
18 [Documentation] Boot OS and trigger reboot and expect
19 ... OS to boot back.
20 # 1. Boot OS
21 # 2. Verify OS is booted
22 # 3. Issue "reboot" from OS
23 # 4. Verify if OS is booted back
24
George Keishing329aac32017-06-05 12:03:26 -050025 # By default run test for 1 loop, else user input iteration.
George Keishing6c2ac912017-05-12 06:36:21 -050026 # Fails immediately if any of the execution rounds fail.
27
28 # Note: Host Reboot is implemented by the OBMC Boot Test tool.
29 # OBMC Boot Test will take the necessary steps to get the OBMC
30 # to a host powered on state before attempting the Host Reboot.
31 Repeat Keyword ${BOOT_LOOP_COUNT} times Host Reboot
32
33*** Keywords ***
George Keishing329aac32017-06-05 12:03:26 -050034
Steven Sombarfac31e92017-12-15 09:40:34 -060035Test Teardown Execution
George Keishing329aac32017-06-05 12:03:26 -050036 [Documentation] Do the post test teardown.
37 # 1. Capture FFDC on test failure.
38 # 2. Stop SOL logging.
39 # 3. Close all open SSH connections.
40
41 FFDC On Test Case Fail
42
43 ${keyword_buf}= Catenate Stop SOL Console Logging
44 ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
45 Run Key ${keyword_buf}
46
47 Close All Connections