George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 1 | *** Settings *** |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 2 | |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 3 | Documentation Stress the system using HTX exerciser. |
| 4 | |
| 5 | # Test Parameters: |
| 6 | # OPENBMC_HOST The BMC host name or IP address. |
| 7 | # OS_HOST The OS host name or IP Address. |
| 8 | # OS_USERNAME The OS login userid (usually root). |
| 9 | # OS_PASSWORD The password for the OS login. |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 10 | # HTX_DURATION Duration of HTX run, for example, 2h, or 30m. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 11 | # HTX_LOOP The number of times to loop HTX. |
| 12 | # HTX_INTERVAL The time delay between consecutive checks of HTX |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 13 | # status, for example, 15m. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 14 | # In summary: Run HTX for $HTX_DURATION, looping |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 15 | # $HTX_LOOP times checking for errors every |
| 16 | # $HTX_INTERVAL. Then allow extra time for OS |
| 17 | # Boot, HTX startup, shutdown. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 18 | # HTX_KEEP_RUNNING If set to 1, this indicates that the HTX is to |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 19 | # continue running after an error was found. |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 20 | # CHECK_INVENTORY If set to 0 or False, OS inventory checking before |
| 21 | # and after each HTX run will be disabled. This |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 22 | # parameter is optional. The default value is True. |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 23 | # PREV_INV_FILE_PATH The file path and name of an initial previous |
| 24 | # inventory snapshot file in JSON format. Inventory |
| 25 | # snapshots taken before and after each HTX run will |
| 26 | # be compared to this file. |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 27 | # This parameter is optional. If not specified an |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 28 | # initial inventory snapshot will be taken before |
| 29 | # HTX startup. |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 30 | # INV_IGNORE_LIST A comma-delimited list of strings that |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 31 | # indicate what to ignore if there are inventory |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 32 | # differences, (e.g., processor "size"). |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 33 | # If differences are found during inventory checking |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 34 | # and those items are in this list, the |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 35 | # differences will be ignored. This parameter is |
| 36 | # optional. If not specified the default value is |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 37 | # "size". |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 38 | |
| 39 | Resource ../syslib/utils_os.robot |
George Keishing | dc1691d | 2017-12-07 12:17:46 -0600 | [diff] [blame] | 40 | Resource ../lib/openbmc_ffdc_utils.robot |
Steven Sombar | 3ecb689 | 2018-03-23 11:41:08 -0500 | [diff] [blame] | 41 | Resource ../lib/logging_utils.robot |
George Keishing | 559f838 | 2018-10-28 02:17:49 -0500 | [diff] [blame] | 42 | Resource ../lib/code_update_utils.robot |
Steven Sombar | 3839c8c | 2019-09-09 14:39:45 -0500 | [diff] [blame] | 43 | Resource ../lib/esel_utils.robot |
Peter D Phan | 4a8b3bb | 2022-03-08 10:32:08 -0600 | [diff] [blame] | 44 | Resource ../syslib/resource.robot |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 45 | Library ../syslib/utils_keywords.py |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 46 | Library ../lib/utils_files.py |
Steven Sombar | 3ecb689 | 2018-03-23 11:41:08 -0500 | [diff] [blame] | 47 | Library ../lib/logging_utils.py |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 48 | Library ../syslib/utils_os.py |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 49 | |
sarandev3 | 7459c42 | 2023-11-09 01:17:42 -0600 | [diff] [blame] | 50 | Suite Setup Run Keyword And Ignore Error Start SOL Console Logging |
George Keishing | dc1691d | 2017-12-07 12:17:46 -0600 | [diff] [blame] | 51 | Test Setup Test Setup Execution |
| 52 | Test Teardown Test Teardown Execution |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 53 | |
George Keishing | 87dc442 | 2023-10-20 12:56:30 +0530 | [diff] [blame] | 54 | Force Tags HTX_Hardbootme |
Steven Sombar | 6f9d41d | 2017-08-08 13:35:30 -0500 | [diff] [blame] | 55 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 56 | *** Variables **** |
| 57 | |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 58 | ${stack_mode} skip |
Steven Sombar | 6f9d41d | 2017-08-08 13:35:30 -0500 | [diff] [blame] | 59 | ${json_initial_file_path} ${EXECDIR}/os_inventory_initial.json |
| 60 | ${json_final_file_path} ${EXECDIR}/os_inventory_final.json |
| 61 | ${json_diff_file_path} ${EXECDIR}/os_inventory_diff.json |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 62 | ${CHECK_INVENTORY} True |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 63 | ${INV_IGNORE_LIST} size |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 64 | ${PREV_INV_FILE_PATH} NONE |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 65 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 66 | ${rest_keyword} REST |
| 67 | |
Steven Sombar | 3839c8c | 2019-09-09 14:39:45 -0500 | [diff] [blame] | 68 | # Error log Severities to ignore when checking Error Logs. |
George Keishing | 178d9bf | 2020-07-09 08:29:29 -0500 | [diff] [blame] | 69 | @{ESEL_IGNORE_LIST} |
Steven Sombar | d6365f1 | 2019-04-02 09:38:29 -0500 | [diff] [blame] | 70 | ... xyz.openbmc_project.Logging.Entry.Level.Informational |
| 71 | |
Steven Sombar | 6f9d41d | 2017-08-08 13:35:30 -0500 | [diff] [blame] | 72 | |
Steven Sombar | 3839c8c | 2019-09-09 14:39:45 -0500 | [diff] [blame] | 73 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 74 | *** Test Cases *** |
| 75 | |
| 76 | Hard Bootme Test |
| 77 | [Documentation] Stress the system using HTX exerciser. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 78 | [Tags] Hard_Bootme_Test |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 79 | |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 80 | Printn |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 81 | Rprint Vars HTX_DURATION HTX_LOOP HTX_INTERVAL CHECK_INVENTORY |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 82 | ... INV_IGNORE_LIST PREV_INV_FILE_PATH |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 83 | |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 84 | Run Keyword If '${PREV_INV_FILE_PATH}' != 'NONE' |
| 85 | ... OperatingSystem.File Should Exist ${PREV_INV_FILE_PATH} |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 86 | |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 87 | Set Suite Variable ${PREV_INV_FILE_PATH} children=true |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 88 | Set Suite Variable ${INV_IGNORE_LIST} children=true |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 89 | |
| 90 | # Set up the iteration (loop) counter. |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 91 | Set Suite Variable ${iteration} ${0} children=true |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 92 | |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 93 | # Estimate the time required for a single iteration loop. |
| 94 | # HTX_DURATION + 10 minutes for OS boot, HTX startup, shutdown. |
| 95 | ${loop_body_seconds}= Add Time To Time ${HTX_DURATION} 10m |
| 96 | Set Suite Variable ${loop_body_seconds} children=true |
| 97 | # And save it in printable (compact) format. |
| 98 | ${estimated_loop_time}= Convert Time |
| 99 | ... ${loop_body_seconds} result_format=compact |
| 100 | Set Suite Variable ${estimated_loop_time} children=true |
| 101 | |
| 102 | # Estimated time remaining = loop_body_seconds * HTX_LOOP + 5m |
| 103 | ${est_seconds_left}= Evaluate ${loop_body_seconds}*${HTX_LOOP}+(5*60) |
| 104 | Set Suite Variable ${est_seconds_left} children=true |
| 105 | |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 106 | Repeat Keyword ${HTX_LOOP} times Run HTX Exerciser |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 107 | |
| 108 | |
| 109 | *** Keywords *** |
| 110 | |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 111 | |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 112 | Run HTX Exerciser |
| 113 | [Documentation] Run HTX exerciser. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 114 | # Test Flow: |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 115 | # - Power on. |
| 116 | # - Establish SSH connection session. |
| 117 | # - Do inventory collection, compare with |
| 118 | # previous inventory run if applicable. |
| 119 | # - Create HTX mdt profile. |
| 120 | # - Run HTX exerciser. |
| 121 | # - Check HTX status for errors. |
| 122 | # - Do inventory collection, compare with |
| 123 | # previous inventory run. |
| 124 | # - Power off. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 125 | |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 126 | Set Suite Variable ${iteration} ${iteration + 1} |
| 127 | ${loop_count}= Catenate Starting iteration: ${iteration} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 128 | ${estimated_time_remaining}= Convert Time |
| 129 | ... ${est_seconds_left} result_format=compact |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 130 | Printn |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 131 | Rprint Vars loop_count estimated_loop_time estimated_time_remaining |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 132 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 133 | Run Keyword ${rest_keyword} Power On stack_mode=skip |
Steven Sombar | 1ddc7c6 | 2018-06-01 11:55:34 -0500 | [diff] [blame] | 134 | Run Key U Sleep \ 15s |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 135 | |
| 136 | # Post Power off and on, the OS SSH session needs to be established. |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 137 | Login To OS |
| 138 | |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 139 | Run Keyword If '${CHECK_INVENTORY}' == 'True' |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 140 | ... Do Inventory And Compare ${json_initial_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 141 | ... ${PREV_INV_FILE_PATH} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 142 | |
George Keishing | 13f44e5 | 2017-05-12 15:28:12 -0500 | [diff] [blame] | 143 | Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu' |
| 144 | ... Create Default MDT Profile |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 145 | |
George Keishing | 13f44e5 | 2017-05-12 15:28:12 -0500 | [diff] [blame] | 146 | Run MDT Profile |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 147 | |
| 148 | Loop HTX Health Check |
| 149 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 150 | Shutdown HTX Exerciser |
| 151 | |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 152 | Run Keyword If '${CHECK_INVENTORY}' == 'True' |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 153 | ... Do Inventory And Compare ${json_final_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 154 | ... ${PREV_INV_FILE_PATH} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 155 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 156 | Run Keyword ${rest_keyword} Power Off |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 157 | |
George Keishing | ae5d978 | 2017-06-12 13:35:59 -0500 | [diff] [blame] | 158 | # Close all SSH and REST active sessions. |
| 159 | Close All Connections |
| 160 | Flush REST Sessions |
| 161 | |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 162 | Print Timen HTX Test ran for: ${HTX_DURATION} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 163 | |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 164 | ${loop_count}= Catenate Ending iteration: ${iteration} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 165 | |
| 166 | ${est_seconds_left}= Evaluate ${est_seconds_left}-${loop_body_seconds} |
| 167 | Set Suite Variable ${est_seconds_left} children=true |
| 168 | ${estimated_time_remaining}= Convert Time |
| 169 | ... ${est_seconds_left} result_format=compact |
| 170 | |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 171 | Rprint Vars loop_count estimated_time_remaining |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 172 | |
George Keishing | 13f44e5 | 2017-05-12 15:28:12 -0500 | [diff] [blame] | 173 | |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 174 | Do Inventory And Compare |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 175 | [Documentation] Do inventory and compare. |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 176 | [Arguments] ${inventory_file_path} ${PREV_INV_FILE_PATH} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 177 | # Description of argument(s): |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 178 | # inventory_file_path The file to receive the inventory snapshot. |
| 179 | # PREV_INV_FILE_PATH The previous inventory to compare with. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 180 | |
| 181 | Create JSON Inventory File ${inventory_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 182 | Run Keyword If '${PREV_INV_FILE_PATH}' != 'NONE' |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 183 | ... Compare Json Inventory Files ${inventory_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 184 | ... ${PREV_INV_FILE_PATH} |
| 185 | ${PREV_INV_FILE_PATH}= Set Variable ${inventory_file_path} |
| 186 | Set Suite Variable ${PREV_INV_FILE_PATH} children=true |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 187 | |
| 188 | |
| 189 | Compare Json Inventory Files |
| 190 | [Documentation] Compare JSON inventory files. |
| 191 | [Arguments] ${file1} ${file2} |
| 192 | # Description of argument(s): |
| 193 | # file1 A file that has an inventory snapshot in JSON format. |
| 194 | # file2 A file that has an inventory snapshot, to compare with file1. |
| 195 | |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 196 | ${diff_rc}= File_Diff ${file1} |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 197 | ... ${file2} ${json_diff_file_path} ${INV_IGNORE_LIST} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 198 | Run Keyword If '${diff_rc}' != '${0}' |
| 199 | ... Report Inventory Mismatch ${diff_rc} ${json_diff_file_path} |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 200 | ... ELSE Print Timen Inventoy check: No differences found. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 201 | |
| 202 | |
| 203 | Report Inventory Mismatch |
| 204 | [Documentation] Report inventory mismatch. |
| 205 | [Arguments] ${diff_rc} ${json_diff_file_path} |
| 206 | # Description of argument(s): |
| 207 | # diff_rc The failing return code from the difference check. |
| 208 | # json_diff_file_path The file that has the latest inventory snapshot. |
| 209 | |
Steven Sombar | a2216d2 | 2017-08-09 12:18:00 -0500 | [diff] [blame] | 210 | Log To Console Significant difference in inventory found, rc=${diff_rc} |
| 211 | Log To Console Differences are listed in file: no_newline=true |
| 212 | Log To Console ${json_diff_file_path} |
| 213 | Log To Console File Contents: |
| 214 | Wait Until Created ${json_diff_file_path} |
| 215 | ${file_contents}= OperatingSystem.Get File ${json_diff_file_path} |
| 216 | Log ${file_contents} level=WARN |
| 217 | Fail Significant difference in inventory found, rc=${diff_rc} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 218 | |
| 219 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 220 | Loop HTX Health Check |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 221 | [Documentation] Run until HTX exerciser fails. |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 222 | Repeat Keyword ${HTX_DURATION} |
| 223 | ... Run Keywords Check HTX Run Status |
George Keishing | 178d9bf | 2020-07-09 08:29:29 -0500 | [diff] [blame] | 224 | ... AND Check For Error Logs ${ESEL_IGNORE_LIST} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 225 | ... AND Sleep ${HTX_INTERVAL} |
| 226 | |
| 227 | |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 228 | Test Setup Execution |
| 229 | [Documentation] Do the initial test setup. |
| 230 | |
Steven Sombar | ac687c4 | 2018-08-09 13:39:36 -0500 | [diff] [blame] | 231 | ${bmc_version} ${stderr} ${rc}= BMC Execute Command |
| 232 | ... cat /etc/os-release |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 233 | Printn |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 234 | Rprint Vars bmc_version |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 235 | |
George Keishing | 1ad128c | 2021-10-28 09:38:37 -0500 | [diff] [blame] | 236 | ${fw_version}= Get BMC Version |
| 237 | Rprint Vars fw_version |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 238 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 239 | ${is_redfish}= Run Keyword And Return Status Redfish.Login |
| 240 | ${rest_keyword}= Set Variable If ${is_redfish} Redfish REST |
| 241 | Rprint Vars rest_keyword |
| 242 | Set Suite Variable ${rest_keyword} children=true |
| 243 | |
| 244 | Run Keyword ${rest_keyword} Power On stack_mode=skip |
| 245 | |
Steven Sombar | 1ddc7c6 | 2018-06-01 11:55:34 -0500 | [diff] [blame] | 246 | Run Key U Sleep \ 15s |
George Keishing | 1ad128c | 2021-10-28 09:38:37 -0500 | [diff] [blame] | 247 | Run Keyword And Ignore Error Delete All Error Logs |
| 248 | Run Keyword And Ignore Error Redfish Purge Event Log |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 249 | Tool Exist htxcmdline |
| 250 | |
George Keishing | 1ad128c | 2021-10-28 09:38:37 -0500 | [diff] [blame] | 251 | ${os_release_info}= utils_os.Get OS Release Info uname |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 252 | Rprint Vars os_release_info fmt=1 |
Steven Sombar | ac687c4 | 2018-08-09 13:39:36 -0500 | [diff] [blame] | 253 | |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 254 | # Shutdown if HTX is running. |
Steven Sombar | 3ecb689 | 2018-03-23 11:41:08 -0500 | [diff] [blame] | 255 | ${status}= Is HTX Running |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 256 | Run Keyword If '${status}' == 'True' |
| 257 | ... Shutdown HTX Exerciser |
| 258 | |
| 259 | |
George Keishing | dc1691d | 2017-12-07 12:17:46 -0600 | [diff] [blame] | 260 | Test Teardown Execution |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 261 | [Documentation] Do the post-test teardown. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 262 | |
George Keishing | 1a23b69 | 2017-05-06 12:19:41 -0500 | [diff] [blame] | 263 | # Keep HTX running if user set HTX_KEEP_RUNNING to 1. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 264 | Run Keyword If |
| 265 | ... '${TEST_STATUS}' == 'FAIL' and ${HTX_KEEP_RUNNING} == ${0} |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 266 | ... Shutdown HTX Exerciser |
| 267 | |
George Keishing | ae5d978 | 2017-06-12 13:35:59 -0500 | [diff] [blame] | 268 | ${keyword_buf}= Catenate Stop SOL Console Logging |
| 269 | ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log |
sarandev3 | 7459c42 | 2023-11-09 01:17:42 -0600 | [diff] [blame] | 270 | Run Keyword And Ignore Error ${keyword_buf} |
George Keishing | ae5d978 | 2017-06-12 13:35:59 -0500 | [diff] [blame] | 271 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 272 | FFDC On Test Case Fail |
| 273 | Close All Connections |