blob: 419dc452f2af0cbc3718b431c4a9ae158a6351c4 [file] [log] [blame]
George Keishing00ee05a2019-02-25 12:35:06 -06001*** Settings ***
2Documentation DMTF tools utility keywords.
3
4Resource resource.robot
5Library gen_cmd.py
6
7*** Variables ***
8
9# ignore_err controls Shell Cmd behavior.
10${ignore_err} ${0}
George Keishing63f7bfc2019-10-29 00:30:38 -050011${stable_branch} master
George Keishing00ee05a2019-02-25 12:35:06 -060012
13*** Keywords ***
14
15Download DMTF Tool
16 [Documentation] Git clone tool.
17 [Arguments] ${rsv_dir_path} ${rsv_github_url}
18
19 # Description of arguments:
20 # rsv_dir_path Directory path for rsv tool (e.g. "Redfish-Service-Validator").
21 # rsv_github_url Github URL link(e.g "https://github.com/DMTF/Redfish-Service-Validator").
22
George Keishing63f7bfc2019-10-29 00:30:38 -050023 ${rc} ${output}= Shell Cmd rm -rf ${rsv_dir_path} ; git clone --branch ${stable_branch} ${rsv_github_url} ${rsv_dir_path}
George Keishing00ee05a2019-02-25 12:35:06 -060024
25
26Run DMTF Tool
27 [Documentation] Execution of the command.
28 [Arguments] ${rsv_dir_path} ${command_string}
29
30 # Description of arguments:
31 # rsv_dir_path Directory path for rsv tool (e.g. "Redfish-Service-Validator").
32 # command_string The complete rsv command string to be run.
33
34 ${rc} ${output}= Shell Cmd ${command_string}
35 Log ${output}
George Keishing398d9e62019-02-28 05:41:33 -060036 [Return] ${output}
37
38
39Redfish Service Validator Result
40 [Documentation] Check tool output for errors.
41 [Arguments] ${tool_output}
George Keishing00ee05a2019-02-25 12:35:06 -060042
43 # Example:
44 # Validation has failed: 9 problems found
George Keishing398d9e62019-02-28 05:41:33 -060045 Should Not Contain ${tool_output} Validation has failed
46
47
48Redfish JsonSchema ResponseValidator Result
49 [Documentation] Check tool output for errors.
50 [Arguments] ${tool_output}
51
52 # Example:
53 # 0 errors
54 Should Contain ${tool_output} 0 errors
55