1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you maynot use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ##############################################################################
22 Library OperatingSystem
27 ${REPORTDIR} ${LOG_PATH}/${SUITE_NAME.replace(' ','_')}
28 ${REDFISHDIR} ${TEMPDIR}/Redfish
33 [Arguments] ${config_file}
34 ${conf}= Load JSON From File ${config_file}
35 ${conf}= Update Value To Json ${conf} $.password ${BMC_PASSWORD}
36 ${conf}= Convert JSON To String ${conf}
37 Create File ${config_file} ${conf}
39 Run Suite Against Target Node
41 Start Process python test_framework.py
42 ... --directory ${REDFISHDIR}/${ip}
44 ... --user ${BMC_USER}
45 ... --interpreter python
47 ... cwd=${REDFISHDIR}/${ip}
49 Process Should Be Running
51 Install Usecase Checkers Test Suite
52 @{BMC_IP}= Remove Duplicates ${BMC_IP}
53 Set Test Variable @{BMC_IP}
54 FOR ${ip} IN @{BMC_IP}
55 Copy Directory /opt/akraino/Redfish-Test-Framework
56 ... ${REDFISHDIR}/${ip}
57 Copy Directory /opt/akraino/Redfish-Usecase-Checkers
58 ... ${REDFISHDIR}/${ip}/Redfish-Usecase-Checkers
59 Create Directory ${REDFISHDIR}/${ip}/reports
60 Update Config File ${REDFISHDIR}/${ip}/framework_conf.json
64 Remove Directory ${REDFISHDIR} recursive=True
68 Set Test Variable @{ips}
69 FOR ${ip} IN @{BMC_IP}
70 Run Suite Against Target Node ${ip}
71 Append To List ${ips} ${ip}
75 @{tmp}= Copy List ${ips}
77 ${result}= Wait For Process ${ip} timeout=1ms
78 Continue For Loop If '${result}' == '${NONE}'
79 Remove Values From List ${ips} ${ip}
80 Copy Files ${REDFISHDIR}/${ip}/reports/output-*/results*.json ${REPORTDIR}/${ip}
81 Copy Files ${REDFISHDIR}/${ip}/output-*/*.html ${REPORTDIR}/${ip}
83 Should Be Empty ${ips}
85 Wait Until Suite Finishes
86 Wait Until Keyword Succeeds 45m 15s Suite Finished
89 FOR ${ip} IN @{BMC_IP}
90 ${result}= Get Process Result ${ip}
91 Should Be Equal As Integers ${result.rc} 0
92 Should Not Contain ${result.stderr} FAILED${\n} (Failures=