blob: 86808e00df694cf4d5a5962ced5132ed81e93362 [file] [log] [blame]
Jay Azurine4c52eb2016-08-16 20:51:10 -05001*** Settings ***
George Keishing42e023a2017-01-06 08:13:03 -06002Documentation Update the PNOR image on the host for
3... hostboot CI purposes.
Jay Azurine4c52eb2016-08-16 20:51:10 -05004
George Keishing42e023a2017-01-06 08:13:03 -06005Library OperatingSystem
Jay Azurin83317a02016-10-18 16:30:56 -05006Resource ../lib/utils.robot
7Resource ../lib/connection_client.robot
8Resource ../lib/openbmc_ffdc.robot
George Keishing42e023a2017-01-06 08:13:03 -06009
Jay Azurin83317a02016-10-18 16:30:56 -050010Test Setup Start SOL Console Logging
11Test Teardown FFDC On Test Case Fail
12Suite Teardown Collect SOL Log
Jay Azurine4c52eb2016-08-16 20:51:10 -050013
14*** Variables ***
15
16*** Test Cases ***
17
18Host BIOS Update And Boot
19 [Tags] open-power
George Keishing42e023a2017-01-06 08:13:03 -060020 [Documentation] Update PNOR image and verify that
21 ... host boots normally.
22
23 Validate Parameters
24 Prepare BMC For Update
Jay Azurine4c52eb2016-08-16 20:51:10 -050025 Update PNOR Image
Jay Azurine4c52eb2016-08-16 20:51:10 -050026
27*** Keywords ***
28
George Keishing42e023a2017-01-06 08:13:03 -060029Prepare BMC For Update
30 [Documentation] Prepare system for PNOR update.
31
Jay Azurine4c52eb2016-08-16 20:51:10 -050032 Initiate Power Off
Michael Walsh2b70ead2017-02-20 16:27:11 -060033
George Keishing42e023a2017-01-06 08:13:03 -060034 Trigger Warm Reset
Michael Walsh2b70ead2017-02-20 16:27:11 -060035 Check If BMC is Up 20 min 10 sec
George Keishing42e023a2017-01-06 08:13:03 -060036
37 Wait Until Keyword Succeeds
Michael Walsh2b70ead2017-02-20 16:27:11 -060038 ... 20 min 10 sec Verify BMC State BMC_READY
George Keishing42e023a2017-01-06 08:13:03 -060039
Jay Azurine4c52eb2016-08-16 20:51:10 -050040 Clear BMC Record Log
41
George Keishing42e023a2017-01-06 08:13:03 -060042
Jay Azurine4c52eb2016-08-16 20:51:10 -050043Update PNOR Image
44 [Documentation] Copy the PNOR image to the BMC /tmp dir and flash it.
George Keishing42e023a2017-01-06 08:13:03 -060045
Jay Azurine4c52eb2016-08-16 20:51:10 -050046 Copy PNOR to BMC
George Keishing42e023a2017-01-06 08:13:03 -060047 ${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 Azurine4c52eb2016-08-16 20:51:10 -050052
53Validate IPL
George Keishing42e023a2017-01-06 08:13:03 -060054 [Documentation] Power the host on, and validate the IPL.
55
Jay Azurine4c52eb2016-08-16 20:51:10 -050056 Initiate Power On
George Keishing42e023a2017-01-06 08:13:03 -060057 Wait Until Keyword Succeeds
58 ... 10 min 30 sec Is System State Host Booted
59
Jay Azurine4c52eb2016-08-16 20:51:10 -050060
Jay Azurin83317a02016-10-18 16:30:56 -050061Collect 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 Azurine4c52eb2016-08-16 20:51:10 -050066
George Keishing42e023a2017-01-06 08:13:03 -060067
68Validate 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