blob: 9387c51ab70d74f00c2e72fbc6a17a54234519cf [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.
manashsarmaa053fb32020-06-08 08:43:32 -050030 [Arguments] ${rsv_dir_path} ${command_string} ${check_error}=0
George Keishing00ee05a2019-02-25 12:35:06 -060031
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.
manashsarmaa053fb32020-06-08 08:43:32 -050035 # check_error It decides if error information is to be checked.
George Keishing00ee05a2019-02-25 12:35:06 -060036
manashsarmaa053fb32020-06-08 08:43:32 -050037 ${rc} ${output}= Shell Cmd ${command_string} ignore_err=${check_error}
George Keishing00ee05a2019-02-25 12:35:06 -060038 Log ${output}
George Keishing899ae012022-03-25 10:16:41 -050039 [Return] ${rc} ${output}
George Keishing398d9e62019-02-28 05:41:33 -060040
41
42Redfish Service Validator Result
43 [Documentation] Check tool output for errors.
44 [Arguments] ${tool_output}
George Keishing00ee05a2019-02-25 12:35:06 -060045
46 # Example:
47 # Validation has failed: 9 problems found
George Keishing398d9e62019-02-28 05:41:33 -060048 Should Not Contain ${tool_output} Validation has failed
49
50
51Redfish JsonSchema ResponseValidator Result
52 [Documentation] Check tool output for errors.
53 [Arguments] ${tool_output}
54
55 # Example:
56 # 0 errors
57 Should Contain ${tool_output} 0 errors
58