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