xref: /openbmc/openbmc-test-automation/redfish/dmtf_tools/Redfish_Reference_Checker.robot (revision 94041a34a992d9b5f6418a43e1cd5273a6d9f9b2)
1*** Settings ***
2Documentation             Test BMC using https://github.com/DMTF/Redfish-Reference-Checker
3...                       DMTF tool.
4
5Library                   OperatingSystem
6Resource                  ../../lib/dmtf_tools_utils.robot
7Resource                  ../../lib/openbmc_ffdc.robot
8
9Test Setup                Test Setup Execution
10
11Test Tags                 Redfish_Reference_Checker
12
13*** Variables ***
14
15${DEFAULT_PYTHON}         python3
16
17${rsv_github_url}         https://github.com/DMTF/Redfish-Reference-Checker.git
18${rsv_dir_path}           Redfish-Reference-Checker
19
20${command_string}  ${DEFAULT_PYTHON} ${rsv_dir_path}${/}RedfishReferenceTool.py
21...                --nochkcert 'https://${OPENBMC_HOST}:${HTTPS_PORT}/redfish/v1/$metadata'
22
23${branch_name}    main
24
25*** Test Cases ***
26
27Test BMC Redfish Reference
28    [Documentation]  Checks for valid reference URLs in CSDL XML files.
29    [Tags]  Test_BMC_Redfish_Reference
30
31    ${rc}  ${output}=  Run DMTF Tool  ${rsv_dir_path}  ${command_string}  check_error=1
32
33    # Work complete, total failures:  0
34    Should Match Regexp    ${output}  Work complete, total failures:[ ]+0
35    IF  ${rc} != 0  Fail  Redfish-Reference-Checker Failed.
36
37*** Keywords ***
38
39Test Setup Execution
40    [Documentation]  Do test case setup tasks.
41
42    Printn
43    Download DMTF Tool  ${rsv_dir_path}  ${rsv_github_url}  ${branch_name}
44
45