Fix for BIOS attribute sanity test suite

Changes:

Miscellaneous fixes for BIOS attribute sanity test suite.

But, still there are some failure to handle. Will fix it in further commits.

Tested:

Tested on BMC environment.

Change-Id: Ie513ab31b1ae89f88355f9dc3c8966bcca67d9f4
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/pldm/test_redfish_bios_attributes.robot b/pldm/test_redfish_bios_attributes.robot
index 502a732..2e22fa1 100755
--- a/pldm/test_redfish_bios_attributes.robot
+++ b/pldm/test_redfish_bios_attributes.robot
@@ -125,6 +125,7 @@
     ...              and set back to original BIOS attribute values using Redfish.
     [Tags]  Redfish_Verify_Set_BIOS_Enumeration_Attribute_Type
 
+    @{failed_attr_list}=  Create List
 
     # Fetch BIOS attribute optional values from pldmtool getbiostable.
     ${attr_val_data}=  GetBIOSEnumAttributeOptionalValues  ${attr_table_data}
@@ -136,9 +137,15 @@
     # Update multiple attribute values for corresponding attribute handle.
     FOR  ${i}  IN  @{attr_handles}
         @{attr_val_list}=  Set Variable  ${attr_val_data}[${i}]
-        Set Optional BIOS Attribute Values And Verify  ${i}  @{attr_val_list}
+        ${status}=  Run Keyword And Return Status
+        ...  Set Optional BIOS Attribute Values And Verify  ${i}  @{attr_val_list}
+        Run Keyword If  ${status} == ${False}  Append To List  ${failed_attr_list}  ${i}
     END
 
+    ${fail_count}=  Get Length  ${failed_attr_list}
+    Should Be Equal  ${fail_count}  ${0}
+    ...  msg= BIOS write Failed ${fail_count} list: ${failed_attr_list}
+
 
 Redfish Verify Restore BIOS Attribute Values
     [Documentation]  Restore all BIOS attribute values with its default values and verify
@@ -152,7 +159,6 @@
         Set BIOS Attribute Value And Verify  ${i}  ${bios_default_data['${i}']}
     END
 
-
 *** Keywords ***
 
 Redfish BIOS Suite Setup