blob: e51cae5228fb2323364e72a67b9a1d4a4614c7c4 [file] [log] [blame]
Jay Azurine4c52eb2016-08-16 20:51:10 -05001*** Settings ***
Michael Walshabbe68c2017-04-12 16:41:56 -05002Documentation Update the PNOR image on the host for hostboot CI purposes.
Jay Azurine4c52eb2016-08-16 20:51:10 -05003
Michael Walshabbe68c2017-04-12 16:41:56 -05004Library OperatingSystem
5Library ../lib/gen_robot_keyword.py
George Keishing42e023a2017-01-06 08:13:03 -06006
Michael Walshabbe68c2017-04-12 16:41:56 -05007Resource ../extended/obmc_boot_test_resource.robot
8Resource ../lib/utils.robot
9Resource ../lib/connection_client.robot
10Resource ../lib/openbmc_ffdc.robot
11Resource ../lib/state_manager.robot
12
13Test Teardown Run Key FFDC On Test Case Fail
Jay Azurine4c52eb2016-08-16 20:51:10 -050014
15*** Variables ***
16
Michael Walshabbe68c2017-04-12 16:41:56 -050017${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 Azurine4c52eb2016-08-16 20:51:10 -050025*** Test Cases ***
26
27Host BIOS Update And Boot
Michael Walshabbe68c2017-04-12 16:41:56 -050028 [Documentation] Update PNOR image and verify.
29 [Tags] Host_BIOS_Update_And_Boot open-power
George Keishing42e023a2017-01-06 08:13:03 -060030
31 Validate Parameters
32 Prepare BMC For Update
Jay Azurine4c52eb2016-08-16 20:51:10 -050033 Update PNOR Image
Jay Azurine4c52eb2016-08-16 20:51:10 -050034
35*** Keywords ***
36
George Keishing42e023a2017-01-06 08:13:03 -060037Prepare BMC For Update
38 [Documentation] Prepare system for PNOR update.
39
Michael Walshabbe68c2017-04-12 16:41:56 -050040 # Call 'OBMC Boot Test' to do a 'REST Power Off', if needed.
41 Run Key U OBMC Boot Test \ REST Power Off
Michael Walsh2b70ead2017-02-20 16:27:11 -060042
Michael Walshabbe68c2017-04-12 16:41:56 -050043 Run Key Clear BMC Record Log
George Keishing42e023a2017-01-06 08:13:03 -060044
Jay Azurine4c52eb2016-08-16 20:51:10 -050045Update PNOR Image
46 [Documentation] Copy the PNOR image to the BMC /tmp dir and flash it.
George Keishing42e023a2017-01-06 08:13:03 -060047
Michael Walshabbe68c2017-04-12 16:41:56 -050048 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 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