Update Redfish-Reference-Checker and Redfish-Service-Validator suites

Changes:
    - lib/dmtf_tools_utils.robot to return the RC
    - Update test code to handle rc returnning

Resolves  openbmc/openbmc-test-automation#2178
Resolves  openbmc/openbmc-test-automation#2179

Change-Id: Ia9c6f3ea10ed2a25c31cf9c8af84680a441fc954
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/dmtf_tools_utils.robot b/lib/dmtf_tools_utils.robot
index 1fb538f..9387c51 100644
--- a/lib/dmtf_tools_utils.robot
+++ b/lib/dmtf_tools_utils.robot
@@ -36,7 +36,7 @@
 
     ${rc}  ${output}=  Shell Cmd  ${command_string}  ignore_err=${check_error}
     Log  ${output}
-    [Return]  ${output}
+    [Return]  ${rc}  ${output}
 
 
 Redfish Service Validator Result
diff --git a/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot b/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
index 209228e..daac8be 100644
--- a/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
+++ b/redfish/dmtf_tools/Redfish_JsonSchema_ResponseValidator.robot
@@ -31,7 +31,7 @@
     Set Test Variable  ${test_run_status}  ${True}
 
     FOR  ${url}  IN  @{url_list}
-        ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${command_string} -i ${url}
+        ${rc}  ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${command_string} -i ${url}
         ${status}=  Run Keyword And Return Status  Redfish JsonSchema ResponseValidator Result  ${output}
         Run Keyword If  ${status} == ${False}  Set Test Variable  ${test_run_status}  ${status}
         Save Logs For Debugging  ${status}  ${url}
diff --git a/redfish/dmtf_tools/Redfish_Reference_Checker.robot b/redfish/dmtf_tools/Redfish_Reference_Checker.robot
index 5d4582d..a9a80f1 100644
--- a/redfish/dmtf_tools/Redfish_Reference_Checker.robot
+++ b/redfish/dmtf_tools/Redfish_Reference_Checker.robot
@@ -24,10 +24,11 @@
     [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  Redfish-Reference-Checker Failed.
 
 *** Keywords ***
 
diff --git a/redfish/dmtf_tools/Redfish_Service_Validator.robot b/redfish/dmtf_tools/Redfish_Service_Validator.robot
index da51e57..382a2b3 100644
--- a/redfish/dmtf_tools/Redfish_Service_Validator.robot
+++ b/redfish/dmtf_tools/Redfish_Service_Validator.robot
@@ -25,9 +25,10 @@
 
     Download DMTF Tool  ${rsv_dir_path}  ${rsv_github_url}
 
-    ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${cmd_str_master}
+    ${rc}  ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${cmd_str_master}  check_error=1
 
     Redfish Service Validator Result  ${output}
+    Run Keyword If  ${rc} != 0  Fail  Redfish-Service-Validator Failed.
 
 
 Run Redfish Service Validator With Additional Roles
@@ -63,14 +64,15 @@
     Download DMTF Tool  ${rsv_dir_path}  ${rsv_github_url}
 
     ${cmd}=  Catenate  ${DEFAULT_PYTHON} ${rsv_dir_path}${/}RedfishServiceValidator.py
-    ...  --ip https://${OPENBMC_HOST}:${HTTPS_PORT} --nochkcert --authtype=Session -u ${username}
-    ...  -p ${password} --logdir ${EXECDIR}${/}logs_${username}${/} --debug_logging
+    ...  --ip https://${OPENBMC_HOST}:${HTTPS_PORT} --authtype=Session -u ${username}
+    ...  -p ${password} --logdir ${EXECDIR}${/}logs_${username}${/} --debugging
 
     Rprint Vars  cmd
 
-    ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${cmd}
+    ${rc}  ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${cmd}  check_error=1
 
     Redfish Service Validator Result  ${output}
+    Run Keyword If  ${rc} != 0  Fail
 
 
 Delete User Created