Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 1 | *** Settings *** |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 2 | Documentation Update the PNOR image on the host for |
| 3 | ... hostboot CI purposes. |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 4 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 5 | Library OperatingSystem |
Jay Azurin | 83317a0 | 2016-10-18 16:30:56 -0500 | [diff] [blame] | 6 | Resource ../lib/utils.robot |
| 7 | Resource ../lib/connection_client.robot |
| 8 | Resource ../lib/openbmc_ffdc.robot |
Rahul Maheshwari | cd72399 | 2017-03-23 23:55:40 -0500 | [diff] [blame] | 9 | Resource ../lib/state_manager.robot |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 10 | |
Jay Azurin | 83317a0 | 2016-10-18 16:30:56 -0500 | [diff] [blame] | 11 | Test Teardown FFDC On Test Case Fail |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 12 | |
| 13 | *** Variables *** |
| 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | Host BIOS Update And Boot |
| 18 | [Tags] open-power |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 19 | [Documentation] Update PNOR image and verify that |
| 20 | ... host boots normally. |
| 21 | |
| 22 | Validate Parameters |
| 23 | Prepare BMC For Update |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 24 | Update PNOR Image |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 25 | |
| 26 | *** Keywords *** |
| 27 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 28 | Prepare BMC For Update |
| 29 | [Documentation] Prepare system for PNOR update. |
| 30 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 31 | Initiate Power Off |
Michael Walsh | 2b70ead | 2017-02-20 16:27:11 -0600 | [diff] [blame] | 32 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 33 | Trigger Warm Reset |
Michael Walsh | 2b70ead | 2017-02-20 16:27:11 -0600 | [diff] [blame] | 34 | Check If BMC is Up 20 min 10 sec |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 35 | |
Rahul Maheshwari | cd72399 | 2017-03-23 23:55:40 -0500 | [diff] [blame] | 36 | Wait For BMC Ready |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 37 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 38 | Clear BMC Record Log |
| 39 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 40 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 41 | Update PNOR Image |
| 42 | [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] | 43 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 44 | Copy PNOR to BMC |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 45 | ${pnor_path} ${pnor_basename}= Split Path ${PNOR_IMAGE_PATH} |
| 46 | Flash PNOR /tmp/${pnor_basename} |
| 47 | Wait Until Keyword Succeeds |
| 48 | ... 7 min 10 sec Is PNOR Flash Done |
| 49 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 50 | |
| 51 | Validate IPL |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 52 | [Documentation] Power the host on, and validate the IPL. |
| 53 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 54 | Initiate Power On |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 55 | Wait Until Keyword Succeeds |
| 56 | ... 10 min 30 sec Is System State Host Booted |
| 57 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 58 | |
Jay Azurin | 83317a0 | 2016-10-18 16:30:56 -0500 | [diff] [blame] | 59 | Collect SOL Log |
| 60 | [Documentation] Log FFDC if test suite fails and collect SOL log |
| 61 | ... for debugging purposes. |
| 62 | ${sol_out}= Stop SOL Console Logging |
| 63 | Create File ${EXECDIR}${/}logs${/}SOL.log ${sol_out} |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 64 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 65 | |
| 66 | Validate Parameters |
| 67 | [Documentation] Validate parameter and file existence. |
| 68 | Should Not Be Empty |
| 69 | ... ${PNOR_IMAGE_PATH} msg=PNOR image path not set |
| 70 | |
| 71 | OperatingSystem.File Should Exist ${PNOR_IMAGE_PATH} |
| 72 | ... msg=${PNOR_IMAGE_PATH} File not found |
| 73 | |