blob: 887f48a04af04ee10a370dbcece9db1c0d58dc5e [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
Rahul Maheshwaricd723992017-03-23 23:55:40 -05009Resource ../lib/state_manager.robot
George Keishing42e023a2017-01-06 08:13:03 -060010
Jay Azurin83317a02016-10-18 16:30:56 -050011Test Teardown FFDC On Test Case Fail
Jay Azurine4c52eb2016-08-16 20:51:10 -050012
13*** Variables ***
14
15*** Test Cases ***
16
17Host BIOS Update And Boot
18 [Tags] open-power
George Keishing42e023a2017-01-06 08:13:03 -060019 [Documentation] Update PNOR image and verify that
20 ... host boots normally.
21
22 Validate Parameters
23 Prepare BMC For Update
Jay Azurine4c52eb2016-08-16 20:51:10 -050024 Update PNOR Image
Jay Azurine4c52eb2016-08-16 20:51:10 -050025
26*** Keywords ***
27
George Keishing42e023a2017-01-06 08:13:03 -060028Prepare BMC For Update
29 [Documentation] Prepare system for PNOR update.
30
Jay Azurine4c52eb2016-08-16 20:51:10 -050031 Initiate Power Off
Michael Walsh2b70ead2017-02-20 16:27:11 -060032
George Keishing42e023a2017-01-06 08:13:03 -060033 Trigger Warm Reset
Michael Walsh2b70ead2017-02-20 16:27:11 -060034 Check If BMC is Up 20 min 10 sec
George Keishing42e023a2017-01-06 08:13:03 -060035
Rahul Maheshwaricd723992017-03-23 23:55:40 -050036 Wait For 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