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 | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 43 | Library ../syslib/utils_keywords.py |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 44 | Library ../lib/utils_files.py |
Steven Sombar | 3ecb689 | 2018-03-23 11:41:08 -0500 | [diff] [blame] | 45 | Library ../lib/logging_utils.py |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 46 | Library ../syslib/utils_os.py |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 47 | |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 48 | Suite Setup Run Keyword Start SOL Console Logging |
George Keishing | dc1691d | 2017-12-07 12:17:46 -0600 | [diff] [blame] | 49 | Test Setup Test Setup Execution |
| 50 | Test Teardown Test Teardown Execution |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 51 | |
Steven Sombar | 6f9d41d | 2017-08-08 13:35:30 -0500 | [diff] [blame] | 52 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 53 | *** Variables **** |
| 54 | |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 55 | ${stack_mode} skip |
Steven Sombar | 6f9d41d | 2017-08-08 13:35:30 -0500 | [diff] [blame] | 56 | ${json_initial_file_path} ${EXECDIR}/os_inventory_initial.json |
| 57 | ${json_final_file_path} ${EXECDIR}/os_inventory_final.json |
| 58 | ${json_diff_file_path} ${EXECDIR}/os_inventory_diff.json |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 59 | ${CHECK_INVENTORY} True |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 60 | ${INV_IGNORE_LIST} size |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 61 | ${PREV_INV_FILE_PATH} NONE |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 62 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 63 | ${rest_keyword} REST |
| 64 | |
Steven Sombar | d6365f1 | 2019-04-02 09:38:29 -0500 | [diff] [blame] | 65 | # Error log Severities to ignore when checking for eSELs. |
| 66 | @{ESEL_WHITELIST} |
| 67 | ... xyz.openbmc_project.Logging.Entry.Level.Informational |
| 68 | |
Steven Sombar | 6f9d41d | 2017-08-08 13:35:30 -0500 | [diff] [blame] | 69 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 70 | *** Test Cases *** |
| 71 | |
| 72 | Hard Bootme Test |
| 73 | [Documentation] Stress the system using HTX exerciser. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 74 | [Tags] Hard_Bootme_Test |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 75 | |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 76 | Printn |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 77 | Rprint Vars HTX_DURATION HTX_LOOP HTX_INTERVAL CHECK_INVENTORY |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 78 | ... INV_IGNORE_LIST PREV_INV_FILE_PATH |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 79 | |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 80 | Run Keyword If '${PREV_INV_FILE_PATH}' != 'NONE' |
| 81 | ... OperatingSystem.File Should Exist ${PREV_INV_FILE_PATH} |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 82 | |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 83 | Set Suite Variable ${PREV_INV_FILE_PATH} children=true |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 84 | Set Suite Variable ${INV_IGNORE_LIST} children=true |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 85 | |
| 86 | # Set up the iteration (loop) counter. |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 87 | Set Suite Variable ${iteration} ${0} children=true |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 88 | |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 89 | # Estimate the time required for a single iteration loop. |
| 90 | # HTX_DURATION + 10 minutes for OS boot, HTX startup, shutdown. |
| 91 | ${loop_body_seconds}= Add Time To Time ${HTX_DURATION} 10m |
| 92 | Set Suite Variable ${loop_body_seconds} children=true |
| 93 | # And save it in printable (compact) format. |
| 94 | ${estimated_loop_time}= Convert Time |
| 95 | ... ${loop_body_seconds} result_format=compact |
| 96 | Set Suite Variable ${estimated_loop_time} children=true |
| 97 | |
| 98 | # Estimated time remaining = loop_body_seconds * HTX_LOOP + 5m |
| 99 | ${est_seconds_left}= Evaluate ${loop_body_seconds}*${HTX_LOOP}+(5*60) |
| 100 | Set Suite Variable ${est_seconds_left} children=true |
| 101 | |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 102 | Repeat Keyword ${HTX_LOOP} times Run HTX Exerciser |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 103 | |
| 104 | |
| 105 | *** Keywords *** |
| 106 | |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 107 | |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 108 | Run HTX Exerciser |
| 109 | [Documentation] Run HTX exerciser. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 110 | # Test Flow: |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 111 | # - Power on. |
| 112 | # - Establish SSH connection session. |
| 113 | # - Do inventory collection, compare with |
| 114 | # previous inventory run if applicable. |
| 115 | # - Create HTX mdt profile. |
| 116 | # - Run HTX exerciser. |
| 117 | # - Check HTX status for errors. |
| 118 | # - Do inventory collection, compare with |
| 119 | # previous inventory run. |
| 120 | # - Power off. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 121 | |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 122 | Set Suite Variable ${iteration} ${iteration + 1} |
| 123 | ${loop_count}= Catenate Starting iteration: ${iteration} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 124 | ${estimated_time_remaining}= Convert Time |
| 125 | ... ${est_seconds_left} result_format=compact |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 126 | Printn |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 127 | Rprint Vars loop_count estimated_loop_time estimated_time_remaining |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 128 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 129 | Run Keyword ${rest_keyword} Power On stack_mode=skip |
Steven Sombar | 1ddc7c6 | 2018-06-01 11:55:34 -0500 | [diff] [blame] | 130 | Run Key U Sleep \ 15s |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 131 | |
| 132 | # 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] | 133 | Login To OS |
| 134 | |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 135 | Run Keyword If '${CHECK_INVENTORY}' == 'True' |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 136 | ... Do Inventory And Compare ${json_initial_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 137 | ... ${PREV_INV_FILE_PATH} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 138 | |
George Keishing | 13f44e5 | 2017-05-12 15:28:12 -0500 | [diff] [blame] | 139 | Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu' |
| 140 | ... Create Default MDT Profile |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 141 | |
George Keishing | 13f44e5 | 2017-05-12 15:28:12 -0500 | [diff] [blame] | 142 | Run MDT Profile |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 143 | |
| 144 | Loop HTX Health Check |
| 145 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 146 | Shutdown HTX Exerciser |
| 147 | |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 148 | Run Keyword If '${CHECK_INVENTORY}' == 'True' |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 149 | ... Do Inventory And Compare ${json_final_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 150 | ... ${PREV_INV_FILE_PATH} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 151 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 152 | Run Keyword ${rest_keyword} Power Off |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 153 | |
George Keishing | ae5d978 | 2017-06-12 13:35:59 -0500 | [diff] [blame] | 154 | # Close all SSH and REST active sessions. |
| 155 | Close All Connections |
| 156 | Flush REST Sessions |
| 157 | |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 158 | Print Timen HTX Test ran for: ${HTX_DURATION} |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 159 | |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 160 | ${loop_count}= Catenate Ending iteration: ${iteration} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 161 | |
| 162 | ${est_seconds_left}= Evaluate ${est_seconds_left}-${loop_body_seconds} |
| 163 | Set Suite Variable ${est_seconds_left} children=true |
| 164 | ${estimated_time_remaining}= Convert Time |
| 165 | ... ${est_seconds_left} result_format=compact |
| 166 | |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 167 | Rprint Vars loop_count estimated_time_remaining |
Steven Sombar | 16dba51 | 2017-10-20 07:20:08 -0500 | [diff] [blame] | 168 | |
George Keishing | 13f44e5 | 2017-05-12 15:28:12 -0500 | [diff] [blame] | 169 | |
Steven Sombar | a2f166c | 2017-08-02 14:22:45 -0500 | [diff] [blame] | 170 | Do Inventory And Compare |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 171 | [Documentation] Do inventory and compare. |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 172 | [Arguments] ${inventory_file_path} ${PREV_INV_FILE_PATH} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 173 | # Description of argument(s): |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 174 | # inventory_file_path The file to receive the inventory snapshot. |
| 175 | # PREV_INV_FILE_PATH The previous inventory to compare with. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 176 | |
| 177 | Create JSON Inventory File ${inventory_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 178 | Run Keyword If '${PREV_INV_FILE_PATH}' != 'NONE' |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 179 | ... Compare Json Inventory Files ${inventory_file_path} |
Steven Sombar | 2c97f81 | 2017-10-31 09:55:13 -0500 | [diff] [blame] | 180 | ... ${PREV_INV_FILE_PATH} |
| 181 | ${PREV_INV_FILE_PATH}= Set Variable ${inventory_file_path} |
| 182 | Set Suite Variable ${PREV_INV_FILE_PATH} children=true |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 183 | |
| 184 | |
| 185 | Compare Json Inventory Files |
| 186 | [Documentation] Compare JSON inventory files. |
| 187 | [Arguments] ${file1} ${file2} |
| 188 | # Description of argument(s): |
| 189 | # file1 A file that has an inventory snapshot in JSON format. |
| 190 | # file2 A file that has an inventory snapshot, to compare with file1. |
| 191 | |
Steven Sombar | b6749a6 | 2017-10-06 08:34:23 -0500 | [diff] [blame] | 192 | ${diff_rc}= File_Diff ${file1} |
Steven Sombar | 48ad01d | 2017-08-17 14:17:37 -0500 | [diff] [blame] | 193 | ... ${file2} ${json_diff_file_path} ${INV_IGNORE_LIST} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 194 | Run Keyword If '${diff_rc}' != '${0}' |
| 195 | ... Report Inventory Mismatch ${diff_rc} ${json_diff_file_path} |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 196 | ... ELSE Print Timen Inventoy check: No differences found. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 197 | |
| 198 | |
| 199 | Report Inventory Mismatch |
| 200 | [Documentation] Report inventory mismatch. |
| 201 | [Arguments] ${diff_rc} ${json_diff_file_path} |
| 202 | # Description of argument(s): |
| 203 | # diff_rc The failing return code from the difference check. |
| 204 | # json_diff_file_path The file that has the latest inventory snapshot. |
| 205 | |
Steven Sombar | a2216d2 | 2017-08-09 12:18:00 -0500 | [diff] [blame] | 206 | Log To Console Significant difference in inventory found, rc=${diff_rc} |
| 207 | Log To Console Differences are listed in file: no_newline=true |
| 208 | Log To Console ${json_diff_file_path} |
| 209 | Log To Console File Contents: |
| 210 | Wait Until Created ${json_diff_file_path} |
| 211 | ${file_contents}= OperatingSystem.Get File ${json_diff_file_path} |
| 212 | Log ${file_contents} level=WARN |
| 213 | Fail Significant difference in inventory found, rc=${diff_rc} |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 214 | |
| 215 | |
Steven Sombar | 7cc95a3 | 2018-11-05 15:01:06 -0600 | [diff] [blame] | 216 | Check For ESELs |
Steven Sombar | d6365f1 | 2019-04-02 09:38:29 -0500 | [diff] [blame] | 217 | [Documentation] Terminate if eSELs with Severity field not on WHITELIST. |
| 218 | |
| 219 | Print Timen Checking eSEL Error Logs. |
Steven Sombar | 7cc95a3 | 2018-11-05 15:01:06 -0600 | [diff] [blame] | 220 | ${error_logs}= Get Error Logs |
Steven Sombar | d6365f1 | 2019-04-02 09:38:29 -0500 | [diff] [blame] | 221 | |
Steven Sombar | 021cbc4 | 2019-03-28 11:49:21 -0500 | [diff] [blame] | 222 | ${num_error_logs}= Get Length ${error_logs} |
| 223 | Rprint Vars num_error_logs |
Steven Sombar | d6365f1 | 2019-04-02 09:38:29 -0500 | [diff] [blame] | 224 | Return From Keyword If ${num_error_logs} == ${0} |
| 225 | |
Steven Sombar | 242fd7e | 2019-04-15 07:15:57 -0500 | [diff] [blame] | 226 | Print Error Logs ${error_logs} |
Steven Sombar | d6365f1 | 2019-04-02 09:38:29 -0500 | [diff] [blame] | 227 | |
| 228 | # Get a list of the severities of the error logs. |
| 229 | ${error_log_severities}= Nested Get Severity ${error_logs} |
| 230 | # Subtract the WHITELIST from the error_log_severities. |
| 231 | ${problem_error_logs}= |
| 232 | ... Evaluate list(set($error_log_severities) - set($ESEL_WHITELIST)) |
| 233 | ${num_error_logs_not_on_whitelist}= Get Length ${problem_error_logs} |
| 234 | |
| 235 | Return From Keyword If ${num_error_logs_not_on_whitelist} == ${0} |
| 236 | |
| 237 | Rprint Vars ESEL_WHITELIST |
| 238 | Fail msg=Found error logs with Severity not matching ESEL_WHITELIST. |
Steven Sombar | 7cc95a3 | 2018-11-05 15:01:06 -0600 | [diff] [blame] | 239 | |
| 240 | |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 241 | Loop HTX Health Check |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 242 | [Documentation] Run until HTX exerciser fails. |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 243 | Repeat Keyword ${HTX_DURATION} |
| 244 | ... Run Keywords Check HTX Run Status |
Steven Sombar | 7cc95a3 | 2018-11-05 15:01:06 -0600 | [diff] [blame] | 245 | ... AND Check For ESELs |
George Keishing | 8b082fd | 2017-05-03 13:42:39 -0500 | [diff] [blame] | 246 | ... AND Sleep ${HTX_INTERVAL} |
| 247 | |
| 248 | |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 249 | Test Setup Execution |
| 250 | [Documentation] Do the initial test setup. |
| 251 | |
Steven Sombar | ac687c4 | 2018-08-09 13:39:36 -0500 | [diff] [blame] | 252 | ${bmc_version} ${stderr} ${rc}= BMC Execute Command |
| 253 | ... cat /etc/os-release |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 254 | Printn |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 255 | Rprint Vars bmc_version |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 256 | |
George Keishing | 559f838 | 2018-10-28 02:17:49 -0500 | [diff] [blame] | 257 | ${pnor_version}= Get Host Software Objects Details |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 258 | Rprint Vars pnor_version |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 259 | |
Steven Sombar | 377a2cd | 2019-04-09 11:42:56 -0500 | [diff] [blame] | 260 | ${is_redfish}= Run Keyword And Return Status Redfish.Login |
| 261 | ${rest_keyword}= Set Variable If ${is_redfish} Redfish REST |
| 262 | Rprint Vars rest_keyword |
| 263 | Set Suite Variable ${rest_keyword} children=true |
| 264 | |
| 265 | Run Keyword ${rest_keyword} Power On stack_mode=skip |
| 266 | |
Steven Sombar | 1ddc7c6 | 2018-06-01 11:55:34 -0500 | [diff] [blame] | 267 | Run Key U Sleep \ 15s |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 268 | Delete All Error Logs |
| 269 | Tool Exist htxcmdline |
| 270 | |
Steven Sombar | ac687c4 | 2018-08-09 13:39:36 -0500 | [diff] [blame] | 271 | ${os_release_info}= Get OS Release Info |
Michael Walsh | 0d5f96a | 2019-05-20 10:09:57 -0500 | [diff] [blame] | 272 | Rprint Vars os_release_info fmt=1 |
Steven Sombar | ac687c4 | 2018-08-09 13:39:36 -0500 | [diff] [blame] | 273 | |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 274 | # Shutdown if HTX is running. |
Steven Sombar | 3ecb689 | 2018-03-23 11:41:08 -0500 | [diff] [blame] | 275 | ${status}= Is HTX Running |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 276 | Run Keyword If '${status}' == 'True' |
| 277 | ... Shutdown HTX Exerciser |
| 278 | |
| 279 | |
George Keishing | dc1691d | 2017-12-07 12:17:46 -0600 | [diff] [blame] | 280 | Test Teardown Execution |
Steven Sombar | e0be915 | 2018-08-08 08:22:53 -0500 | [diff] [blame] | 281 | [Documentation] Do the post-test teardown. |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 282 | |
George Keishing | 1a23b69 | 2017-05-06 12:19:41 -0500 | [diff] [blame] | 283 | # Keep HTX running if user set HTX_KEEP_RUNNING to 1. |
Steven Sombar | 130a04f | 2017-07-16 10:02:37 -0500 | [diff] [blame] | 284 | Run Keyword If |
| 285 | ... '${TEST_STATUS}' == 'FAIL' and ${HTX_KEEP_RUNNING} == ${0} |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 286 | ... Shutdown HTX Exerciser |
| 287 | |
George Keishing | ae5d978 | 2017-06-12 13:35:59 -0500 | [diff] [blame] | 288 | ${keyword_buf}= Catenate Stop SOL Console Logging |
| 289 | ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log |
| 290 | Run Key ${keyword_buf} |
| 291 | |
George Keishing | ffbe8ce | 2017-05-04 12:08:54 -0500 | [diff] [blame] | 292 | FFDC On Test Case Fail |
| 293 | Close All Connections |