Robot Framework 7.0 changes
Update robot code syntax overall in the repo
Changes:
- Update the requirement.txt package version for robot
- The '[Return]' setting is deprecated.
Use the 'RETURN' statement instead.
- Singular section headers like '*** Test Case ***'
are deprecated. Use plural format like
'*** Test Cases ***' instead.
- Singular section headers like '*** Variable ***'
are deprecated
Tested:
- Ran from sandbox with the version
$ robot --version
Robot Framework 7.0 (Python 3.10.12 on linux)
and also tested on latest python version
Robot Framework 7.0 (Python 3.11.9 on linux)
Change-Id: I54e85f9d799556c63b9a39f79483f83e9b980768
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/ipmi/dcmi/test_dcmi_asset_tag.robot b/ipmi/dcmi/test_dcmi_asset_tag.robot
index 7c6af70..d8959c6 100644
--- a/ipmi/dcmi/test_dcmi_asset_tag.robot
+++ b/ipmi/dcmi/test_dcmi_asset_tag.robot
@@ -104,7 +104,7 @@
Set Test Variable ${random_string}
Set Test Variable ${number_of_bytes_to_write}
- [Return] ${ret}
+ RETURN ${ret}
Get Raw Asset Tag
[Documentation] Get asset tag command in raw command.
@@ -112,7 +112,7 @@
${cmd}= Catenate ${DCMI_RAW_CMD['DCMI']['Asset_Tag'][0]} 0x${number_of_bytes_to_write}
${ret}= Run IPMI Command ${cmd}
- [Return] ${ret}
+ RETURN ${ret}
Validate Asset Tag Via Raw Command
[Documentation] Validate asset tag via raw cmd.
@@ -136,4 +136,4 @@
... '${length_1}' != '1' ${length}
${ret}= Convert To Lower Case ${length_2}
- [Return] ${ret}
+ RETURN ${ret}
diff --git a/ipmi/dcmi/test_dcmi_get_temperature_reading.robot b/ipmi/dcmi/test_dcmi_get_temperature_reading.robot
index 07dce0e..1873743 100644
--- a/ipmi/dcmi/test_dcmi_get_temperature_reading.robot
+++ b/ipmi/dcmi/test_dcmi_get_temperature_reading.robot
@@ -197,4 +197,4 @@
${ret}= Run External IPMI Standard Command sensor | grep -i "${sensor_name}"
- [Return] ${ret}
+ RETURN ${ret}
diff --git a/ipmi/dcmi/test_dcmi_management_controller.robot b/ipmi/dcmi/test_dcmi_management_controller.robot
index 9bde566..c21ee6b 100644
--- a/ipmi/dcmi/test_dcmi_management_controller.robot
+++ b/ipmi/dcmi/test_dcmi_management_controller.robot
@@ -136,7 +136,7 @@
${resp}= Run IPMI Command ${mcid_get_cmd}
${resp}= Strip String ${resp} mode=right characters=${SPACE}00\n
- [Return] ${resp}
+ RETURN ${resp}
Set DCMI Management Controller Identifier String
[Documentation] Set DCMI MCID String.
@@ -157,7 +157,7 @@
Set Test Variable ${random_int}
Set Test Variable ${number_of_bytes_to_write}
- [Return] ${resp}
+ RETURN ${resp}
Get Hostname From BMC Console
[Documentation] Get hostname.
@@ -167,7 +167,7 @@
${name}= Convert To List ${bmc_hostname}
${hostname_bytes}= convert_name_into_bytes_without_prefix ${name[0]}
- [Return] ${hostname_bytes}
+ RETURN ${hostname_bytes}
Get Response Length In Hex
[Documentation] Get response length in hex.
@@ -180,4 +180,4 @@
... '${length_1}' != '1' ${length}
${resp_length_3}= Convert To Lower Case ${length_2}
- [Return] ${resp_length_3}
+ RETURN ${resp_length_3}