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