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 |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 9 | |
Jay Azurin | 83317a0 | 2016-10-18 16:30:56 -0500 | [diff] [blame] | 10 | Test Setup Start SOL Console Logging |
| 11 | Test Teardown FFDC On Test Case Fail |
| 12 | Suite Teardown Collect SOL Log |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 13 | |
| 14 | *** Variables *** |
| 15 | |
| 16 | *** Test Cases *** |
| 17 | |
| 18 | Host BIOS Update And Boot |
| 19 | [Tags] open-power |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 20 | [Documentation] Update PNOR image and verify that |
| 21 | ... host boots normally. |
| 22 | |
| 23 | Validate Parameters |
| 24 | Prepare BMC For Update |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 25 | Update PNOR Image |
| 26 | Validate IPL |
| 27 | |
| 28 | *** Keywords *** |
| 29 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 30 | Prepare BMC For Update |
| 31 | [Documentation] Prepare system for PNOR update. |
| 32 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 33 | Initiate Power Off |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 34 | Trigger Warm Reset |
| 35 | Check If BMC is Up 10 min 10 sec |
| 36 | |
| 37 | Wait Until Keyword Succeeds |
| 38 | ... 10 min 10 sec Verify BMC State BMC_READY |
| 39 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 40 | Clear BMC Record Log |
| 41 | |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 42 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 43 | Update PNOR Image |
| 44 | [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] | 45 | |
Jay Azurin | e4c52eb | 2016-08-16 20:51:10 -0500 | [diff] [blame] | 46 | Copy PNOR to BMC |
George Keishing | 42e023a | 2017-01-06 08:13:03 -0600 | [diff] [blame] | 47 | ${pnor_path} ${pnor_basename}= Split Path ${PNOR_IMAGE_PATH} |
| 48 | Flash PNOR /tmp/${pnor_basename} |
| 49 | Wait Until Keyword Succeeds |
| 50 | ... 7 min 10 sec Is PNOR Flash Done |
| 51 | |
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 | |