Address issue for deprecated syntax
Change from :FOR to FOR/END to address a new WARNING in
the new robot version.
Sample warning message as mention below.
FOR loop starting on line 26: For loop header
': FOR' is deprecated. Use 'FOR' instead.
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
Change-Id: I1720b3c7e6fbbafda3fca6f91edf97c80fdd9f41
diff --git a/extended/code_update/code_update_utils.robot b/extended/code_update/code_update_utils.robot
index 6946d90..3a4df5f 100755
--- a/extended/code_update/code_update_utils.robot
+++ b/extended/code_update/code_update_utils.robot
@@ -79,9 +79,10 @@
# Description of argument(s):
# image_file_path Downloaded BMC tar file image path.
- : FOR ${index} IN RANGE 0 4
- \ ${status}= Retry SCP ${image_file_path}
- \ Exit For Loop If '${status}' == '${True}'
+ FOR ${index} IN RANGE 0 4
+ ${status}= Retry SCP ${image_file_path}
+ Exit For Loop If '${status}' == '${True}'
+ END
Retry SCP
diff --git a/extended/full_suite_regression.robot b/extended/full_suite_regression.robot
index b767c1c..a4a62a7 100755
--- a/extended/full_suite_regression.robot
+++ b/extended/full_suite_regression.robot
@@ -37,13 +37,15 @@
Log To Console ${RESULT_DIR_PATH}
Create Directory ${RESULT_DIR_PATH}
- : FOR ${INDEX} IN RANGE 0 ${ITERATION}
- \ Log To Console \n Iteration: no_newline=True
- \ Log To Console ${INDEX}
- \ Run OPENBMC_HOST=${OPENBMC_HOST} tox -e ${OPENBMC_SYSTEMMODEL} -- ${LOOP_TEST_COMMAND}
- \ Run sed -i 's/'${OPENBMC_HOST}'/DUMMYIP/g' output.xml
- \ Copy File output.xml ${RESULT_DIR_PATH}/output${INDEX}.xml
- \ Copy File log.html ${RESULT_DIR_PATH}/log${INDEX}.html
+ FOR ${INDEX} IN RANGE 0 ${ITERATION}
+ Log To Console \n Iteration: no_newline=True
+ Log To Console ${INDEX}
+ Run OPENBMC_HOST=${OPENBMC_HOST} tox -e ${OPENBMC_SYSTEMMODEL} -- ${LOOP_TEST_COMMAND}
+ Run sed -i 's/'${OPENBMC_HOST}'/DUMMYIP/g' output.xml
+ Copy File output.xml ${RESULT_DIR_PATH}/output${INDEX}.xml
+ Copy File log.html ${RESULT_DIR_PATH}/log${INDEX}.html
+ END
+
Create Combined Report
[Documentation] Using output[?].xml and create combined log.html
@@ -81,4 +83,4 @@
${output}=
... Run wkhtmltopdf ./${combined_report_html_file_path} ./${combined_report_pdf_file_path}
Should Not Be Empty ${output}
- OperatingSystem.File Should Exist ${combined_report_pdf_file_path}
\ No newline at end of file
+ OperatingSystem.File Should Exist ${combined_report_pdf_file_path}
diff --git a/ipmi/test_ipmi_sdr.robot b/ipmi/test_ipmi_sdr.robot
index 01c23aa..f14a57b 100755
--- a/ipmi/test_ipmi_sdr.robot
+++ b/ipmi/test_ipmi_sdr.robot
@@ -273,10 +273,12 @@
# component_name Component name (e.g. "core", "dimm", etc.).
${component_uri_list}= Get Component URIs ${component_name}
- : FOR ${uri} IN @{component_uri_list}
- \ ${component_name}= Fetch From Right ${uri} motherboard/
- \ Log To Console ${component_name}
- \ Verify SDR ${component_name}
+
+ FOR ${uri} IN @{component_uri_list}
+ ${component_name}= Fetch From Right ${uri} motherboard/
+ Log To Console ${component_name}
+ Verify SDR ${component_name}
+ END
Suite Setup Execution
diff --git a/ipmi/test_ipmi_sol.robot b/ipmi/test_ipmi_sol.robot
index 13ce00a..941d4dd 100644
--- a/ipmi/test_ipmi_sol.robot
+++ b/ipmi/test_ipmi_sol.robot
@@ -57,10 +57,12 @@
[Tags] Set_Valid_SOL_Privilege_Level
${privilege_level_list}= Create List user operator admin oem
- : FOR ${item} IN @{privilege_level_list}
- \ Set SOL Setting privilege-level ${item}
- \ ${output}= Get SOL Setting Privilege Level
- \ Should Contain ${output} ${item} ignore_case=True
+
+ FOR ${item} IN @{privilege_level_list}
+ Set SOL Setting privilege-level ${item}
+ ${output}= Get SOL Setting Privilege Level
+ Should Contain ${output} ${item} ignore_case=True
+ END
Set Invalid SOL Privilege Level
diff --git a/xcat/test_xcat_group.robot b/xcat/test_xcat_group.robot
index 36441e4..6aad3ce 100644
--- a/xcat/test_xcat_group.robot
+++ b/xcat/test_xcat_group.robot
@@ -23,36 +23,44 @@
[Tags] Add_BMC_Nodes_To_XCAT
# Add BMC nodes one by one and check whether it is successfully added.
- : FOR ${bmc} IN @{BMC_LIST}
- \ Add Nodes To XCAT ${bmc}
- \ Validate Added Node ${bmc}
+ FOR ${bmc} IN @{BMC_LIST}
+ Add Nodes To XCAT ${bmc}
+ Validate Added Node ${bmc}
+ END
+
Power On Via XCAT And Validate
[Documentation] Power on via XCAT and validate.
[Tags] Power_On_Via_XCAT_And_Validate
# Power on each BMC node and validate the power status.
- : FOR ${bmc} IN @{BMC_LIST}
- \ Power On Via XCAT ${bmc}
- \ Validate Power Status Via XCAT ${bmc} ${poweron_flag}
+ FOR ${bmc} IN @{BMC_LIST}
+ Power On Via XCAT ${bmc}
+ Validate Power Status Via XCAT ${bmc} ${poweron_flag}
+ END
+
Power Off Via XCAT And Validate
[Documentation] Power off via XCAT and validate.
[Tags] Power_Off_Via_XCAT_And_Validate
# Power off each BMC node and validate the power status.
- : FOR ${bmc} IN @{BMC_LIST}
- \ Power Off Via XCAT ${bmc}
- \ Validate Power Status Via XCAT ${bmc} ${poweroff_flag}
+ FOR ${bmc} IN @{BMC_LIST}
+ Power Off Via XCAT ${bmc}
+ Validate Power Status Via XCAT ${bmc} ${poweroff_flag}
+ END
+
Add Nodes To Group List
[Documentation] Add BMC nodes into group.
[Tags] Move_Added_Nodes_To_Group
# Add BMC nodes to group and validate.
- : FOR ${bmc} IN @{BMC_LIST}
- \ Add Nodes To Group ${bmc} ${GROUP}
- \ Validate Node Added In Group ${bmc} ${GROUP}
+ FOR ${bmc} IN @{BMC_LIST}
+ Add Nodes To Group ${bmc} ${GROUP}
+ Validate Node Added In Group ${bmc} ${GROUP}
+ END
+
Power On Group And Validate
[Documentation] Power on all BMCs in group and validate.
@@ -72,8 +80,10 @@
@{bmc_nodes}= Split String ${nodes}
# Validate power status on each BMC node one by one.
- : FOR ${bmc_node} IN @{bmc_nodes}
- \ Validate Power Status Via XCAT ${bmc_node} ${poweron_flag}
+ FOR ${bmc_node} IN @{bmc_nodes}
+ Validate Power Status Via XCAT ${bmc_node} ${poweron_flag}
+ END
+
Power Off Group And Validate
[Documentation] Power off all BMCs in group and validate.
@@ -92,8 +102,10 @@
@{bmc_nodes}= Split String ${nodes}
# Validate power status on each BMC node one by one.
- : FOR ${bmc_node} IN @{bmc_nodes}
- \ Validate Power Status Via XCAT ${bmc_node} ${poweroff_flag}
+ FOR ${bmc_node} IN @{bmc_nodes}
+ Validate Power Status Via XCAT ${bmc_node} ${poweroff_flag}
+ END
+
Continuous Node Power Status
[Documentation] Continuously get the power status.
@@ -109,8 +121,10 @@
# It bascially stress the BMC node and test REST implementation
# of the BMC node
- : FOR ${index} IN RANGE 1 ${NUM_POWER_STATUS_CHECKS}
- \ Validate Power Status Via XCAT ${BMC_LIST[1]} ${poweron_flag}
+ FOR ${index} IN RANGE 1 ${NUM_POWER_STATUS_CHECKS}
+ Validate Power Status Via XCAT ${BMC_LIST[1]} ${poweron_flag}
+ END
+
Get Temperature Reading Via XCAT
[Documentation] Get temperature reading via XCAT.
@@ -129,10 +143,12 @@
# Get temperature reading from each BMC node.
- : FOR ${bmc} IN @{BMC_LIST}
- \ ${temp_reading}= Get Hardware Vitals Via XCAT ${bmc} temp
- \ Should Match ${temp_reading} ${bmc}* C
- \ Log \n Temperature reading on $[bmc}\n ${temp_reading}
+ FOR ${bmc} IN @{BMC_LIST}
+ ${temp_reading}= Get Hardware Vitals Via XCAT ${bmc} temp
+ Should Match ${temp_reading} ${bmc}* C
+ Log \n Temperature reading on $[bmc}\n ${temp_reading}
+ END
+
Get Fanspeed Via XCAT
[Documentation] Get fanspeed via XCAT.
@@ -146,10 +162,11 @@
# Get fanspeed from each BMC node.
- : FOR ${bmc} IN @{BMC_LIST}
- \ ${fanspeed}= Get Hardware Vitals Via XCAT ${bmc} fanspeed
- \ Should Match ${fanspeed} ${bmc}* RPMS
- \ Log \n fanspeed on $[bmc}\n ${fanspeed}
+ FOR ${bmc} IN @{BMC_LIST}
+ ${fanspeed}= Get Hardware Vitals Via XCAT ${bmc} fanspeed
+ Should Match ${fanspeed} ${bmc}* RPMS
+ Log \n fanspeed on $[bmc}\n ${fanspeed}
+ END
Get Voltage Reading Via XCAT
@@ -162,9 +179,11 @@
# Get voltage reading from each BMC node.
- : FOR ${bmc} IN @{BMC_LIST}
- \ ${voltage}= Get Hardware Vitals Via XCAT ${bmc} voltage
- \ Log \n Voltage reading on $[bmc}\n ${voltage}
+ FOR ${bmc} IN @{BMC_LIST}
+ ${voltage}= Get Hardware Vitals Via XCAT ${bmc} voltage
+ Log \n Voltage reading on $[bmc}\n ${voltage}
+ END
+
Get Wattage Via XCAT
[Documentation] Get wattage via XCAT.
@@ -176,10 +195,10 @@
# Get wattage reading from each BMC node.
- : FOR ${bmc} IN @{BMC_LIST}
- \ ${wattage}= Get Hardware Vitals Via XCAT ${bmc} wattage
- \ Log \n Wattage reading on $[bmc}\n ${wattage}
-
+ FOR ${bmc} IN @{BMC_LIST}
+ ${wattage}= Get Hardware Vitals Via XCAT ${bmc} wattage
+ Log \n Wattage reading on $[bmc}\n ${wattage}
+ END
*** Keywords ***