PNOR update enhancement
Changes address the following:
- Documentation updates
- Few minor alignment fix
- Renaming keyword name
- Added parameter validation
- Update logic to wait for BMC standby
Resolves openbmc/openbmc-test-automation#239
Change-Id: Ib0f9a4681ebee952284c37caebcee8fff22db061
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/test_bios_update.robot b/extended/test_bios_update.robot
index 1a4dedd..bf97520 100644
--- a/extended/test_bios_update.robot
+++ b/extended/test_bios_update.robot
@@ -1,10 +1,12 @@
*** Settings ***
-Documentation This testsuite updates the PNOR image on the host for
-... hostboot CI purposes.
+Documentation Update the PNOR image on the host for
+... hostboot CI purposes.
+Library OperatingSystem
Resource ../lib/utils.robot
Resource ../lib/connection_client.robot
Resource ../lib/openbmc_ffdc.robot
+
Test Setup Start SOL Console Logging
Test Teardown FFDC On Test Case Fail
Suite Teardown Collect SOL Log
@@ -15,32 +17,46 @@
Host BIOS Update And Boot
[Tags] open-power
- [Documentation] This test updates the PNOR image on the host (BIOS), and
- ... validates that hosts boots normally.
- Reach System Steady State
+ [Documentation] Update PNOR image and verify that
+ ... host boots normally.
+
+ Validate Parameters
+ Prepare BMC For Update
Update PNOR Image
Validate IPL
*** Keywords ***
-Reach System Steady State
- [Documentation] Reboot the BMC, power off the Host and clear any previous
- ... events
- Trigger Warm Reset
+Prepare BMC For Update
+ [Documentation] Prepare system for PNOR update.
+
Initiate Power Off
+ Trigger Warm Reset
+ Check If BMC is Up 10 min 10 sec
+
+ Wait Until Keyword Succeeds
+ ... 10 min 10 sec Verify BMC State BMC_READY
+
Clear BMC Record Log
+
Update PNOR Image
[Documentation] Copy the PNOR image to the BMC /tmp dir and flash it.
+
Copy PNOR to BMC
- ${pnor_path} ${pnor_basename}= Split Path ${PNOR_IMAGE_PATH}
- Flash PNOR /tmp/${pnor_basename}
- Wait Until Keyword Succeeds 7 min 10 sec Is PNOR Flash Done
+ ${pnor_path} ${pnor_basename}= Split Path ${PNOR_IMAGE_PATH}
+ Flash PNOR /tmp/${pnor_basename}
+ Wait Until Keyword Succeeds
+ ... 7 min 10 sec Is PNOR Flash Done
+
Validate IPL
- [Documentation] Power the host on, and validate the IPL
+ [Documentation] Power the host on, and validate the IPL.
+
Initiate Power On
- Wait Until Keyword Succeeds 10 min 30 sec Is System State Host Booted
+ Wait Until Keyword Succeeds
+ ... 10 min 30 sec Is System State Host Booted
+
Collect SOL Log
[Documentation] Log FFDC if test suite fails and collect SOL log
@@ -48,3 +64,12 @@
${sol_out}= Stop SOL Console Logging
Create File ${EXECDIR}${/}logs${/}SOL.log ${sol_out}
+
+Validate Parameters
+ [Documentation] Validate parameter and file existence.
+ Should Not Be Empty
+ ... ${PNOR_IMAGE_PATH} msg=PNOR image path not set
+
+ OperatingSystem.File Should Exist ${PNOR_IMAGE_PATH}
+ ... msg=${PNOR_IMAGE_PATH} File not found
+