openbmc / openbmc-test-automation

Apache License 2.0
100 stars 92 forks source link

refactoring redfish/dmtf_tools/Redfish_Reference_Checker.robot #2179

Closed generatz closed 2 years ago

generatz commented 2 years ago

The underlying DMTF test is passing, but the robot test case is failing.

I refactored the Test BMC Redfish Reference as follows (see issue #2178 for required change to Run DMTF Tool keyword in lib/dmtf_tools_utils.robot):

Test BMC Redfish Reference
    [Documentation]  Checks for valid reference URLs in CSDL XML files.
    [Tags]  Test_BMC_Redfish_Reference

    ${rc}  ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${command_string}  check_error=1

    # Work complete, total failures:  0
    Should Match Regexp    ${output}  Work complete, total failures:[ ]+0
    Run Keyword If  ${rc} != 0  fail

Here is the patch:

diff --git a/redfish/dmtf_tools/Redfish_Reference_Checker.robot b/redfish/dmtf_tools/Redfish_Reference_Checker.robot
index 5d4582dc..79e3ee14 100644
--- a/redfish/dmtf_tools/Redfish_Reference_Checker.robot
+++ b/redfish/dmtf_tools/Redfish_Reference_Checker.robot
@@ -24,10 +24,11 @@ Test BMC Redfish Reference
     [Documentation]  Checks for valid reference URLs in CSDL XML files.
     [Tags]  Test_BMC_Redfish_Reference

-    ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${command_string}
+    ${rc}  ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${command_string}  check_error=1

     # Work complete, total failures:  0
     Should Match Regexp    ${output}  Work complete, total failures:[ ]+0
+    Run Keyword If  ${rc} != 0  fail

 *** Keywords ***
gkeishin commented 2 years ago

https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/52380