blob: 5b175ff10c8d82c2acd3a0a085b83d7e3340845b [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 Keishing2d0804e2019-12-12 22:27:05 -060023 ${cmd_buf} Catenate rm -rf ${rsv_dir_path} ;
24 ... git clone --branch ${stable_branch} ${rsv_github_url} ${rsv_dir_path}
25 ${rc} ${output}= Shell Cmd ${cmd_buf}
George Keishing00ee05a2019-02-25 12:35:06 -060026
27
28Run DMTF Tool
29 [Documentation] Execution of the command.
30 [Arguments] ${rsv_dir_path} ${command_string}
31
32 # Description of arguments:
33 # rsv_dir_path Directory path for rsv tool (e.g. "Redfish-Service-Validator").
34 # command_string The complete rsv command string to be run.
35
36 ${rc} ${output}= Shell Cmd ${command_string}
37 Log ${output}
George Keishing398d9e62019-02-28 05:41:33 -060038 [Return] ${output}
39
40
41Redfish Service Validator Result
42 [Documentation] Check tool output for errors.
43 [Arguments] ${tool_output}
George Keishing00ee05a2019-02-25 12:35:06 -060044
45 # Example:
46 # Validation has failed: 9 problems found
George Keishing398d9e62019-02-28 05:41:33 -060047 Should Not Contain ${tool_output} Validation has failed
48
49
50Redfish JsonSchema ResponseValidator Result
51 [Documentation] Check tool output for errors.
52 [Arguments] ${tool_output}
53
54 # Example:
55 # 0 errors
56 Should Contain ${tool_output} 0 errors
57