Update v2.0-stable branch to work with new robot package 3.x version
Change-Id: I52262e13ce2450ce5dae81f56cf5079017238072
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/ipmi/test_fru.robot b/tests/ipmi/test_fru.robot
index ed8cc56..10eb793 100644
--- a/tests/ipmi/test_fru.robot
+++ b/tests/ipmi/test_fru.robot
@@ -43,7 +43,7 @@
# From the inventory_uris, select just the ones for the component of
# interest.
${component_uris}= Get Matches ${inventory_uris}
- ... regexp=^.*[0-9a-z_].${component_name}[0-9]*$
+ ... regexp=^.*[0-9a-z_].${component_name}\[0-9]*$
# Get the component information for each record.
${component_frus}= Create List
@@ -123,7 +123,7 @@
# /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0
# /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1
${component_uris}= Get Matches ${inventory_uris}
- ... regexp=^.*[0-9a-z_].${component_name}[0-9]*$
+ ... regexp=^.*[0-9a-z_].${component_name}\[0-9]*$
: FOR ${uri} IN @{component_uris}
\ ${sub_component}= Fetch From Right ${uri} /
@@ -166,9 +166,12 @@
: FOR ${rest_fru_sub_component} IN @{fru_component_info}
\ ${fru_component_section}=
\ ... Get From List ${fru_component_info} ${index}
- \ ${status}= Run Keyword And Return Status Should Contain
- \ ... ${fru_component_section['fru_device_description']}
- \ ... ${sub_component}
+ \ # Get FRU name from IPMI's fru_device_description field.
+ \ # Example "cpu0" from "cpu0 (ID 1)".
+ \ ${fru_name}= Fetch From Left
+ \ ... ${fru_component_section['fru_device_description']} ${SPACE}
+ \ ${status}= Run Keyword And Return Status Should Be Equal
+ \ ... ${fru_name} ${sub_component}
\ Exit For Loop If '${status}' == '${True}'
\ ${index}= Evaluate ${index} + 1
\ Exit For Loop If ${index} >= ${sub_component_count}
diff --git a/tests/ipmi/test_sdr.robot b/tests/ipmi/test_sdr.robot
index b70d0d1..cd6ed0f 100755
--- a/tests/ipmi/test_sdr.robot
+++ b/tests/ipmi/test_sdr.robot
@@ -130,7 +130,7 @@
# uri_list URI list.
${component_uris}= Get Matches ${uri_list}
- ... regexp=^.*[0-9a-z_].${component_name}[0-9]*$
+ ... regexp=^.*[0-9a-z_].${component_name}\[0-9]*$
[Return] ${component_uris}
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 00985a2..eff05c1 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -695,7 +695,7 @@
# item Inventory name (example: "fan/cpu/dimm/etc").
${count_inventory} Set Variable ${0}
- ${list}= Get Endpoint Paths ${HOST_INVENTORY_URI}/system/
+ ${list}= Get Endpoint Paths ${HOST_INVENTORY_URI}system/
... ${item}
: FOR ${element} IN @{list}