Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 1 | *** Settings *** |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 2 | Documentation Update the PNOR image on the host for hostboot CI purposes. |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 3 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 4 | Library OperatingSystem |
| 5 | Library ../lib/gen_robot_keyword.py |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 6 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 7 | Resource ../extended/obmc_boot_test_resource.robot |
| 8 | Resource ../lib/utils.robot |
| 9 | Resource ../lib/connection_client.robot |
| 10 | Resource ../lib/openbmc_ffdc.robot |
| 11 | Resource ../lib/state_manager.robot |
| 12 | |
Steven Sombar | fac31e9 | 2017-12-15 09:40:34 -0600 | [diff] [blame] | 13 | Test Teardown Test Teardown Execution |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 14 | |
Sweta Potthuri | b2c50f1 | 2017-06-28 03:53:30 -0500 | [diff] [blame] | 15 | Force Tags BIOS_Code_Update |
Sweta Potthuri | 5db43e4 | 2017-06-15 05:36:44 -0500 | [diff] [blame] | 16 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 17 | *** Variables *** |
| 18 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 19 | ${QUIET} ${1} |
| 20 | # OBMC Boot Test failures are not acceptable so we set the threshold to 0. |
| 21 | ${boot_fail_threshold} ${0} |
| 22 | # "skip" indicates to OBMC Boot Test that it should only process boot stack |
| 23 | # items that would change the machine state, i.e. only if the action is |
| 24 | # needed. |
| 25 | ${stack_mode} skip |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 26 | ${update_status} True |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 27 | |
George Keishing | a0a1312 | 2017-05-18 12:51:09 -0500 | [diff] [blame] | 28 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 29 | *** Test Cases *** |
| 30 | |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 31 | Host BIOS Update |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 32 | [Documentation] Update PNOR image and verify. |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 33 | [Tags] Host_BIOS_Update open-power |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 34 | |
| 35 | Validate Parameters |
| 36 | Prepare BMC For Update |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 37 | Update PNOR Image |
George Keishing | a0a1312 | 2017-05-18 12:51:09 -0500 | [diff] [blame] | 38 | Verify PNOR Update |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 39 | |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 40 | Host BIOS Power On |
| 41 | [Documentation] Power On the system and wait for OS |
| 42 | [Tags] Host_BIOS_Power_On open-power |
| 43 | |
| 44 | Run Keyword If '${PREV_TEST_STATUS}' == 'PASS' Validate Power On |
| 45 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 46 | *** Keywords *** |
| 47 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 48 | Prepare BMC For Update |
| 49 | [Documentation] Prepare system for PNOR update. |
| 50 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 51 | # Call 'OBMC Boot Test' to do a 'REST Power Off', if needed. |
| 52 | Run Key U OBMC Boot Test \ REST Power Off |
George Keishing | 81ae14c | 2017-06-05 14:02:15 -0500 | [diff] [blame] | 53 | Run Key Delete Error logs |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 54 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 55 | Update PNOR Image |
| 56 | [Documentation] Copy the PNOR image to the BMC /tmp dir and flash it. |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 57 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 58 | Run Key Copy PNOR to BMC |
| 59 | ${pnor_path} ${pnor_basename}= Split Path ${PNOR_IMAGE_PATH} |
| 60 | Run Key Flash PNOR \ /tmp/${pnor_basename} |
Michael Walsh | 31062af | 2018-07-09 14:20:09 -0500 | [diff] [blame] | 61 | Run Key Wait Until Keyword Succeeds \ 15 min \ 10 sec \ Is PNOR Flash Done |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 62 | |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 63 | Validate Power On |
Gunnar Mills | 28e403b | 2017-10-25 16:16:38 -0500 | [diff] [blame] | 64 | [Documentation] Power the host on, and validate that the system booted. |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 65 | [Teardown] Validate Power On Teardown |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 66 | |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 67 | # Have to start SOL logging here. Starting SOL in test setup closes the |
| 68 | # connection when bmc reboots. |
| 69 | Run Key Start SOL Console Logging |
| 70 | Run Key U OBMC Boot Test \ REST Power On |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 71 | |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 72 | Validate Power On Teardown |
| 73 | [Documentation] Teardown after Validate Power On. |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 74 | |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 75 | ${keyword_buf}= Catenate Stop SOL Console Logging |
| 76 | ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log |
| 77 | Run Key ${keyword_buf} |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 78 | |
Steven Sombar | fac31e9 | 2017-12-15 09:40:34 -0600 | [diff] [blame] | 79 | Test Teardown Execution |
Prachi Gupta | 5284328 | 2017-04-21 10:05:47 -0500 | [diff] [blame] | 80 | [Documentation] Log FFDC if test suite fails and collect SOL log for |
| 81 | ... debugging purposes. |
| 82 | |
| 83 | Printn |
| 84 | Run Key FFDC On Test Case Fail |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 85 | |
| 86 | Validate Parameters |
| 87 | [Documentation] Validate parameter and file existence. |
| 88 | Should Not Be Empty |
| 89 | ... ${PNOR_IMAGE_PATH} msg=PNOR image path not set |
| 90 | |
| 91 | OperatingSystem.File Should Exist ${PNOR_IMAGE_PATH} |
| 92 | ... msg=${PNOR_IMAGE_PATH} File not found |
| 93 | |