Extended bucket robot codes with latest directives
Changes:
- Run KeyWord If is deprecated since Robot
Framework version 5.*, use 'IF' instead
Tested:
- Checked using robot dry-run to make sure the
syntax is not broken
Change-Id: I64ed8f89d176144468ed580683b0f5d1ed2fcd37
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/host_code_update.robot b/extended/code_update/host_code_update.robot
index 229aa76..fe458bd 100644
--- a/extended/code_update/host_code_update.robot
+++ b/extended/code_update/host_code_update.robot
@@ -66,8 +66,9 @@
[Teardown] Run Keywords Stop SOL Console Logging
... AND Code Update Test Teardown
- Run Keyword If '${PREV_TEST_STATUS}' == 'FAIL'
- ... Fail Code update failed. No need to boot to OS.
+ IF '${PREV_TEST_STATUS}' == 'FAIL'
+ Fail Code update failed. No need to boot to OS.
+ END
Delete All Error Logs
REST Power On
Verify Running Host Image ${IMAGE_FILE_PATH}
@@ -109,8 +110,7 @@
[Teardown] Run Keywords REST Power Off stack_mode=skip
... AND Code Update Test Teardown
- Run Keyword If '${PREV_TEST_STATUS}' == 'FAIL'
- ... Fail Cannot boot the OS.
+ IF '${PREV_TEST_STATUS}' == 'FAIL' Fail Cannot boot the OS.
REST Power On stack_mode=skip
Upload And Activate Image
@@ -182,8 +182,9 @@
... images and verify that the priorities are not the same.
[Tags] Set_Same_Priority_For_Multiple_Host_Images
- Run Keyword If '${PREV_TEST_STATUS}' == 'FAIL'
- ... Fail Activation of alternate image failed. Cannot set priority.
+ IF '${PREV_TEST_STATUS}' == 'FAIL'
+ Fail Activation of alternate image failed. Cannot set priority.
+ END
Set Same Priority For Multiple Images ${VERSION_PURPOSE_HOST}
@@ -263,10 +264,11 @@
Run Keyword And Ignore Error Smart Power Off
Run Key Delete All Dumps ignore=1
Run Key Delete All Error Logs ignore=1
- Run Keyword If 'true' == '${DELETE_OLD_PNOR_IMAGES}'
- ... Delete All PNOR Images
- Run Keyword If 'true' == '${DELETE_OLD_GUARD_FILE}' BMC Execute Command
- ... rm -f /var/lib/phosphor-software-manager/pnor/prsv/GUARD
+ IF 'true' == '${DELETE_OLD_PNOR_IMAGES}' Delete All PNOR Images
+ IF 'true' == '${DELETE_OLD_GUARD_FILE}'
+ BMC Execute Command
+ ... rm -f /var/lib/phosphor-software-manager/pnor/prsv/GUARD
+ END
BMC Execute Command rm -rf /tmp/images/*
@@ -296,4 +298,4 @@
# 2. Collect FFDC if test PASS but error log exists.
FFDC On Test Case Fail
- Run Keyword If '${TEST_STATUS}' == 'PASS' Check Error And Collect FFDC
+ IF '${TEST_STATUS}' == 'PASS' Check Error And Collect FFDC
diff --git a/extended/obmc_boot_test_resource.robot b/extended/obmc_boot_test_resource.robot
index a4715db..64ac5f3 100644
--- a/extended/obmc_boot_test_resource.robot
+++ b/extended/obmc_boot_test_resource.robot
@@ -95,7 +95,8 @@
# rename the "OBMC Boot Test Py" python function to "OBMC Boot Test" and
# do away with this robot keyword.
- Run Keyword If '${pos_arg1}' != '${EMPTY}'
- ... Set To Dictionary ${arguments} loc_boot_stack=${pos_arg1}
+ IF '${pos_arg1}' != '${EMPTY}'
+ Set To Dictionary ${arguments} loc_boot_stack=${pos_arg1}
+ END
OBMC Boot Test Py &{arguments}
diff --git a/extended/standby_bmc.robot b/extended/standby_bmc.robot
index cb4a353..478ab17 100644
--- a/extended/standby_bmc.robot
+++ b/extended/standby_bmc.robot
@@ -51,17 +51,17 @@
... Wait For Host To Ping ${OPENBMC_HOST} 2 mins
# Check if the ping works using 1400 MTU.
- #Run Keyword if ${ping_status} == ${True} MTU Ping Test
+ #IF ${ping_status} == ${True} MTU Ping Test
- Run Keyword if ${ping_status} == ${False}
- ... Fail ${OPENBMC_HOST} ping test failed.
+ IF ${ping_status} == ${False} Fail ${OPENBMC_HOST} ping test failed.
Open Connection And Log In host=${OPENBMC_HOST}
- Run Keyword If ${REDFISH_SUPPORTED}
- ... Redfish Clean Up
- ... ELSE
- ... REST Clean Up
+ IF ${REDFISH_SUPPORTED}
+ Redfish Clean Up
+ ELSE
+ REST Clean Up
+ END
Prune Journal Log
@@ -76,10 +76,11 @@
Wait Until Keyword Succeeds 1 min 30 sec Initialize OpenBMC
${ready_status}= Run Keyword And Return Status Is BMC Ready
- Run Keyword If '${ready_status}' == '${False}'
- ... Put BMC State Ready
- ... ELSE
- ... REST Power Off stack_mode=skip
+ IF '${ready_status}' == '${False}'
+ Put BMC State Ready
+ ELSE
+ REST Power Off stack_mode=skip
+ END
Run Keyword And Ignore Error Set BMC Power Policy ${ALWAYS_POWER_OFF}
Run Keyword And Ignore Error Delete All Error Logs
@@ -106,8 +107,9 @@
${l_status}= Run Keyword and Return Status
... Verify Ping and REST Authentication
- Run Keyword If '${l_status}' == '${False}'
- ... Fail msg=System not in ideal state to continue [ERROR]
+ IF '${l_status}' == '${False}'
+ Fail msg=System not in ideal state to continue [ERROR]
+ END
Update Policy Setting
diff --git a/extended/test_bios_update.robot b/extended/test_bios_update.robot
index 7649f6e..f53a739 100644
--- a/extended/test_bios_update.robot
+++ b/extended/test_bios_update.robot
@@ -41,7 +41,7 @@
[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
+ IF '${PREV_TEST_STATUS}' == 'PASS' Validate Power On
*** Keywords ***
diff --git a/extended/test_bmc_reset_loop.robot b/extended/test_bmc_reset_loop.robot
index 56a7709..c94ca28 100644
--- a/extended/test_bmc_reset_loop.robot
+++ b/extended/test_bmc_reset_loop.robot
@@ -83,8 +83,9 @@
${bmc_version}= Get BMC Version
Valid Value bmc_version valid_values=['${initial_bmc_version}']
- Run Keyword If '${CHECK_FOR_ERRORS}' == '${1}'
- ... Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
+ IF '${CHECK_FOR_ERRORS}' == '${1}'
+ Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
+ END
Verify BMC RTC And UTC Time Drift
@@ -97,8 +98,9 @@
${bmc_version}= Get BMC Version
Valid Value bmc_version valid_values=['${initial_bmc_version}']
- Run Keyword If '${CHECK_FOR_ERRORS}' == '${1}'
- ... Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
+ IF '${CHECK_FOR_ERRORS}' == '${1}'
+ Check For Regex In Journald ${ERROR_REGEX} error_check=${0} boot=-b
+ END
Verify BMC RTC And UTC Time Drift