1*** Settings ***
2Documentation   This testsuite updates the PNOR image on the host for
3...             hostboot CI purposes.
4
5Resource          ../lib/utils.robot
6Resource          ../lib/connection_client.robot
7Resource          ../lib/openbmc_ffdc.robot
8Test Setup        Start SOL Console Logging
9Test Teardown     FFDC On Test Case Fail
10Suite Teardown    Collect SOL Log
11
12*** Variables ***
13
14*** Test Cases ***
15
16Host BIOS Update And Boot
17    [Tags]    open-power
18    [Documentation]   This test updates the PNOR image on the host (BIOS), and
19    ...               validates that hosts boots normally.
20    Reach System Steady State
21    Update PNOR Image
22    Validate IPL
23
24*** Keywords ***
25
26Reach System Steady State
27    [Documentation]  Reboot the BMC, power off the Host and clear any previous
28    ...              events
29    Trigger Warm Reset
30    Initiate Power Off
31    Clear BMC Record Log
32
33Update PNOR Image
34    [Documentation]  Copy the PNOR image to the BMC /tmp dir and flash it.
35    Copy PNOR to BMC
36    ${pnor_path}    ${pnor_basename}=   Split Path    ${PNOR_IMAGE_PATH}
37    Flash PNOR     /tmp/${pnor_basename}
38    Wait Until Keyword Succeeds  7 min    10 sec    Is PNOR Flash Done
39
40Validate IPL
41    [Documentation]  Power the host on, and validate the IPL
42    Initiate Power On
43    Wait Until Keyword Succeeds  10 min    30 sec    Is System State Host Booted
44
45Collect SOL Log
46    [Documentation]    Log FFDC if test suite fails and collect SOL log
47    ...                for debugging purposes.
48     ${sol_out}=    Stop SOL Console Logging
49     Create File    ${EXECDIR}${/}logs${/}SOL.log    ${sol_out}
50
51