test_bios_update: validate boot and collect Sol log
Change-Id: I15f1383f85d620149a61554d5e25017403d1e848
Signed-off-by: Prachi Gupta <pragupta@us.ibm.com>
diff --git a/extended/test_bios_update.robot b/extended/test_bios_update.robot
index e51cae5..d8805b7 100644
--- a/extended/test_bios_update.robot
+++ b/extended/test_bios_update.robot
@@ -10,7 +10,7 @@
Resource ../lib/openbmc_ffdc.robot
Resource ../lib/state_manager.robot
-Test Teardown Run Key FFDC On Test Case Fail
+Test Teardown Test Bios Teardown
*** Variables ***
@@ -21,17 +21,24 @@
# items that would change the machine state, i.e. only if the action is
# needed.
${stack_mode} skip
+${update_status} True
*** Test Cases ***
-Host BIOS Update And Boot
+Host BIOS Update
[Documentation] Update PNOR image and verify.
- [Tags] Host_BIOS_Update_And_Boot open-power
+ [Tags] Host_BIOS_Update open-power
Validate Parameters
Prepare BMC For Update
Update PNOR Image
+Host BIOS Power On
+ [Documentation] Power On the system and wait for OS
+ [Tags] Host_BIOS_Power_On open-power
+
+ Run Keyword If '${PREV_TEST_STATUS}' == 'PASS' Validate Power On
+
*** Keywords ***
Prepare BMC For Update
@@ -39,7 +46,6 @@
# Call 'OBMC Boot Test' to do a 'REST Power Off', if needed.
Run Key U OBMC Boot Test \ REST Power Off
-
Run Key Clear BMC Record Log
Update PNOR Image
@@ -50,20 +56,28 @@
Run Key Flash PNOR \ /tmp/${pnor_basename}
Run Key Wait Until Keyword Succeeds \ 7 min \ 10 sec \ Is PNOR Flash Done
-Validate IPL
- [Documentation] Power the host on, and validate the IPL.
+Validate Power On
+ [Documentation] Power the host on, and validate that the sytem booted.
+ [Teardown] Validate Power On Teardown
- Initiate Power On
- Wait Until Keyword Succeeds
- ... 10 min 30 sec Is System State Host Booted
+ # Have to start SOL logging here. Starting SOL in test setup closes the
+ # connection when bmc reboots.
+ Run Key Start SOL Console Logging
+ Run Key U OBMC Boot Test \ REST Power On
+Validate Power On Teardown
+ [Documentation] Teardown after Validate Power On.
-Collect SOL Log
- [Documentation] Log FFDC if test suite fails and collect SOL log
- ... for debugging purposes.
- ${sol_out}= Stop SOL Console Logging
- Create File ${EXECDIR}${/}logs${/}SOL.log ${sol_out}
+ ${keyword_buf}= Catenate Stop SOL Console Logging
+ ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
+ Run Key ${keyword_buf}
+Test Bios Teardown
+ [Documentation] Log FFDC if test suite fails and collect SOL log for
+ ... debugging purposes.
+
+ Printn
+ Run Key FFDC On Test Case Fail
Validate Parameters
[Documentation] Validate parameter and file existence.