blob: dd0334f6281301ffe9ae7db70c670b86ddf9e9f2 [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 Teardown FFDC On Test Case Fail
Jay Azurine4c52eb2016-08-16 20:51:10 -050011
12*** Variables ***
13
14*** Test Cases ***
15
16Host BIOS Update And Boot
17 [Tags] open-power
George Keishing42e023a2017-01-06 08:13:03 -060018 [Documentation] Update PNOR image and verify that
19 ... host boots normally.
20
21 Validate Parameters
22 Prepare BMC For Update
Jay Azurine4c52eb2016-08-16 20:51:10 -050023 Update PNOR Image
Jay Azurine4c52eb2016-08-16 20:51:10 -050024
25*** Keywords ***
26
George Keishing42e023a2017-01-06 08:13:03 -060027Prepare BMC For Update
28 [Documentation] Prepare system for PNOR update.
29
Jay Azurine4c52eb2016-08-16 20:51:10 -050030 Initiate Power Off
Michael Walsh2b70ead2017-02-20 16:27:11 -060031
George Keishing42e023a2017-01-06 08:13:03 -060032 Trigger Warm Reset
Michael Walsh2b70ead2017-02-20 16:27:11 -060033 Check If BMC is Up 20 min 10 sec
George Keishing42e023a2017-01-06 08:13:03 -060034
35 Wait Until Keyword Succeeds
Michael Walsh2b70ead2017-02-20 16:27:11 -060036 ... 20 min 10 sec Verify BMC State BMC_READY
George Keishing42e023a2017-01-06 08:13:03 -060037
Jay Azurine4c52eb2016-08-16 20:51:10 -050038 Clear BMC Record Log
39
George Keishing42e023a2017-01-06 08:13:03 -060040
Jay Azurine4c52eb2016-08-16 20:51:10 -050041Update PNOR Image
42 [Documentation] Copy the PNOR image to the BMC /tmp dir and flash it.
George Keishing42e023a2017-01-06 08:13:03 -060043
Jay Azurine4c52eb2016-08-16 20:51:10 -050044 Copy PNOR to BMC
George Keishing42e023a2017-01-06 08:13:03 -060045 ${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 Azurine4c52eb2016-08-16 20:51:10 -050050
51Validate IPL
George Keishing42e023a2017-01-06 08:13:03 -060052 [Documentation] Power the host on, and validate the IPL.
53
Jay Azurine4c52eb2016-08-16 20:51:10 -050054 Initiate Power On
George Keishing42e023a2017-01-06 08:13:03 -060055 Wait Until Keyword Succeeds
56 ... 10 min 30 sec Is System State Host Booted
57
Jay Azurine4c52eb2016-08-16 20:51:10 -050058
Jay Azurin83317a02016-10-18 16:30:56 -050059Collect 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 Azurine4c52eb2016-08-16 20:51:10 -050064
George Keishing42e023a2017-01-06 08:13:03 -060065
66Validate 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