IPMI test suite 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: Id248062c860ff209875d8f57315f572d9321f783
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/ipmi/test_ipmi_cipher.robot b/ipmi/test_ipmi_cipher.robot
index 4e9497a..c0e71be 100644
--- a/ipmi/test_ipmi_cipher.robot
+++ b/ipmi/test_ipmi_cipher.robot
@@ -196,7 +196,7 @@
${resp}= Strip String ${resp}
# channel 14 represents current channel in which we send request.
- ${channel_num}= Run Keyword If '${channel_num}' == '14'
+ ${channel_num}= Set Variable If '${channel_num}' == '14'
... Convert To Hex ${CHANNEL_NUMBER} length=2
... ELSE
... Convert To Hex ${channel_num} length=2
@@ -225,7 +225,7 @@
# Description of argument(s):
# byte_length extra or less.
- ${req_cmd}= Run Keyword If '${byte_length}' == 'less'
+ ${req_cmd}= Set Variable If '${byte_length}' == 'less'
... Catenate ${IPMI_RAW_CMD['Cipher Suite']['get'][0]} ${CHANNEL_NUMBER} 00
... ELSE
... Catenate ${IPMI_RAW_CMD['Cipher Suite']['get'][0]} ${CHANNEL_NUMBER} 00 00 01
diff --git a/ipmi/test_ipmi_general.robot b/ipmi/test_ipmi_general.robot
index ba05a2b..7b3603f 100644
--- a/ipmi/test_ipmi_general.robot
+++ b/ipmi/test_ipmi_general.robot
@@ -422,7 +422,7 @@
# e.g. high - add extra byte to request data like "0x06 0x38 0x01 0x04 0x01".
# low - reduce bytes in actual request data like "0x06 0x38".
- ${req_cmd}= Run Keyword If '${byte_length}' == 'low'
+ ${req_cmd}= Set Variable If '${byte_length}' == 'low'
... Catenate ${IPMI_RAW_CMD['Get Channel Auth Cap']['get'][0]} ${CHANNEL_NUMBER}
... ELSE
... Catenate ${IPMI_RAW_CMD['Get Channel Auth Cap']['get'][0]} ${CHANNEL_NUMBER} 0x04 0x01
diff --git a/ipmi/test_ipmi_sdr.robot b/ipmi/test_ipmi_sdr.robot
index 96d550a..74b31c7 100755
--- a/ipmi/test_ipmi_sdr.robot
+++ b/ipmi/test_ipmi_sdr.robot
@@ -241,7 +241,7 @@
${reservation_id}= Run IPMI Command
... ${IPMI_RAW_CMD['SDR']['Reserve SDR Repository'][0]}
- ${reservation_id}= Run Keyword If ${add_prefix}
+ ${reservation_id}= Set Variable If ${add_prefix}
... Add Prefix To String ${reservation_id} 0x
... ELSE IF ${convert_lsb_to_msb}
... Convert LSB To MSB ${reservation_id}
diff --git a/ipmi/test_ipmi_sel_time.robot b/ipmi/test_ipmi_sel_time.robot
index 05e0ac6..c358371 100644
--- a/ipmi/test_ipmi_sel_time.robot
+++ b/ipmi/test_ipmi_sel_time.robot
@@ -564,11 +564,11 @@
${modifying_date_status}= Run Keyword And Return Status Should Contain ${time} +
- ${date_time}= Set Variable IF
+ ${date_time}= Set Variable If
... ${modifying_date_status} == True ${time.split("+")[-1]}
... ${modifying_date_status} == False ${time.split("-")[-1]}
- ${datetime} = Run Keyword IF ${modifying_date_status} == True
+ ${datetime} = Set Variable If ${modifying_date_status} == True
... Add Time To Date
... ${current_date} ${date_time} result_format=%m/%d/%Y %H:%M:%S date_format=%m/%d/%Y %H:%M:%S
... ELSE IF ${modifying_date_status} == False
diff --git a/ipmi/test_ipmi_sensor.robot b/ipmi/test_ipmi_sensor.robot
index 566d7a9..b6e09df 100644
--- a/ipmi/test_ipmi_sensor.robot
+++ b/ipmi/test_ipmi_sensor.robot
@@ -211,7 +211,7 @@
# sensor_id Sensor id used to get reading in IPMI or DCMI.
# member_id Member id of sensor data in Redfish.
- ${ipmi_value}= Run Keyword If '${command_type}' == 'IPMI' Get IPMI Sensor Reading ${sensor_id}
+ ${ipmi_value}= Set Variable If '${command_type}' == 'IPMI' Get IPMI Sensor Reading ${sensor_id}
... ELSE Get DCMI Sensor Reading ${sensor_id}
${redfish_value}= Get Temperature Reading From Redfish ${member_id}
diff --git a/ipmi/test_ipmi_sol.robot b/ipmi/test_ipmi_sol.robot
index 3f3a7d9..ce49fd7 100644
--- a/ipmi/test_ipmi_sol.robot
+++ b/ipmi/test_ipmi_sol.robot
@@ -328,7 +328,7 @@
# Retry interval setting is set in multiples of 10.
# Reference IPMI specification v2.0
- ${expected_value}= Run Keyword If
+ ${expected_value}= Set Variable If
... '${setting_name}' == 'character-accumulate-level' Evaluate ${value}*5
... ELSE IF '${setting_name}' == 'retry-interval' Evaluate ${value}*10
... ELSE Set Variable ${value}