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 | |
| 13 | Test Teardown Run Key FFDC On Test Case Fail |
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 |
| 24 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 25 | *** Test Cases *** |
| 26 | |
| 27 | Host BIOS Update And Boot |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 28 | [Documentation] Update PNOR image and verify. |
| 29 | [Tags] Host_BIOS_Update_And_Boot open-power |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 30 | |
| 31 | Validate Parameters |
| 32 | Prepare BMC For Update |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 33 | Update PNOR Image |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 34 | |
| 35 | *** Keywords *** |
| 36 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 37 | Prepare BMC For Update |
| 38 | [Documentation] Prepare system for PNOR update. |
| 39 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 40 | # Call 'OBMC Boot Test' to do a 'REST Power Off', if needed. |
| 41 | Run Key U OBMC Boot Test \ REST Power Off |
Michael Walsh | 2b70ead | 2017-02-20 16:27:11 -0600 | [diff] [blame] | 42 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 43 | Run Key Clear BMC Record Log |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 44 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 45 | Update PNOR Image |
| 46 | [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] | 47 | |
Michael Walsh | abbe68c | 2017-04-12 16:41:56 -0500 | [diff] [blame] | 48 | Run Key Copy PNOR to BMC |
| 49 | ${pnor_path} ${pnor_basename}= Split Path ${PNOR_IMAGE_PATH} |
| 50 | Run Key Flash PNOR \ /tmp/${pnor_basename} |
| 51 | 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] | 52 | |
| 53 | Validate IPL |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 54 | [Documentation] Power the host on, and validate the IPL. |
| 55 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 56 | Initiate Power On |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 57 | Wait Until Keyword Succeeds |
| 58 | ... 10 min 30 sec Is System State Host Booted |
| 59 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 60 | |
Jay Azurin | 83317a0 | 2016-10-18 16:30:56 -0500 | [diff] [blame] | 61 | Collect SOL Log |
| 62 | [Documentation] Log FFDC if test suite fails and collect SOL log |
| 63 | ... for debugging purposes. |
| 64 | ${sol_out}= Stop SOL Console Logging |
| 65 | Create File ${EXECDIR}${/}logs${/}SOL.log ${sol_out} |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 66 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 67 | |
| 68 | Validate Parameters |
| 69 | [Documentation] Validate parameter and file existence. |
| 70 | Should Not Be Empty |
| 71 | ... ${PNOR_IMAGE_PATH} msg=PNOR image path not set |
| 72 | |
| 73 | OperatingSystem.File Should Exist ${PNOR_IMAGE_PATH} |
| 74 | ... msg=${PNOR_IMAGE_PATH} File not found |
| 75 | |