George Keishing | 6c2ac91 | 2017-05-12 06:36:21 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Module to test OS reboot functionality. |
| 3 | |
| 4 | Resource ../lib/boot_utils.robot |
George Keishing | 329aac3 | 2017-06-05 12:03:26 -0500 | [diff] [blame] | 5 | Resource ../extended/obmc_boot_test_resource.robot |
George Keishing | 6c2ac91 | 2017-05-12 06:36:21 -0500 | [diff] [blame] | 6 | |
George Keishing | 329aac3 | 2017-06-05 12:03:26 -0500 | [diff] [blame] | 7 | Suite Setup Run Key Start SOL Console Logging |
Steven Sombar | fac31e9 | 2017-12-15 09:40:34 -0600 | [diff] [blame] | 8 | Test Teardown Test Teardown Execution |
George Keishing | 6c2ac91 | 2017-05-12 06:36:21 -0500 | [diff] [blame] | 9 | |
| 10 | *** Variables *** |
| 11 | |
| 12 | # User defined boot test iteration. |
George Keishing | 329aac3 | 2017-06-05 12:03:26 -0500 | [diff] [blame] | 13 | ${BOOT_LOOP_COUNT} ${1} |
George Keishing | 6c2ac91 | 2017-05-12 06:36:21 -0500 | [diff] [blame] | 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | Host Reboot Loop |
| 18 | [Documentation] Boot OS and trigger reboot and expect |
| 19 | ... OS to boot back. |
George Keishing | d316625 | 2018-10-24 12:10:27 -0500 | [diff] [blame] | 20 | [Tags] Host_Reboot_Loop |
| 21 | |
George Keishing | 6c2ac91 | 2017-05-12 06:36:21 -0500 | [diff] [blame] | 22 | # 1. Boot OS |
| 23 | # 2. Verify OS is booted |
| 24 | # 3. Issue "reboot" from OS |
| 25 | # 4. Verify if OS is booted back |
| 26 | |
George Keishing | 329aac3 | 2017-06-05 12:03:26 -0500 | [diff] [blame] | 27 | # By default run test for 1 loop, else user input iteration. |
George Keishing | 6c2ac91 | 2017-05-12 06:36:21 -0500 | [diff] [blame] | 28 | # Fails immediately if any of the execution rounds fail. |
| 29 | |
| 30 | # Note: Host Reboot is implemented by the OBMC Boot Test tool. |
| 31 | # OBMC Boot Test will take the necessary steps to get the OBMC |
| 32 | # to a host powered on state before attempting the Host Reboot. |
| 33 | Repeat Keyword ${BOOT_LOOP_COUNT} times Host Reboot |
| 34 | |
| 35 | *** Keywords *** |
George Keishing | 329aac3 | 2017-06-05 12:03:26 -0500 | [diff] [blame] | 36 | |
Steven Sombar | fac31e9 | 2017-12-15 09:40:34 -0600 | [diff] [blame] | 37 | Test Teardown Execution |
George Keishing | 329aac3 | 2017-06-05 12:03:26 -0500 | [diff] [blame] | 38 | [Documentation] Do the post test teardown. |
| 39 | # 1. Capture FFDC on test failure. |
| 40 | # 2. Stop SOL logging. |
| 41 | # 3. Close all open SSH connections. |
| 42 | |
| 43 | FFDC On Test Case Fail |
| 44 | |
| 45 | ${keyword_buf}= Catenate Stop SOL Console Logging |
| 46 | ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log |
| 47 | Run Key ${keyword_buf} |
| 48 | |
| 49 | Close All Connections |