Corrected the logic to get fru name from IPMI output

Change-Id: I4db8c997868336552a24b76a694deed2d9c2c557
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/tests/ipmi/test_fru.robot b/tests/ipmi/test_fru.robot
index d9583ff..10eb793 100644
--- a/tests/ipmi/test_fru.robot
+++ b/tests/ipmi/test_fru.robot
@@ -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}