SUT already can be passed from CLI.
Change-Id: I3ff68ebf94ce25dfc0a42964cf1aafc8e58da4b6
Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
}
#Getoptions
-while getopts ":t:i:p:s:r:he" optchar; do
+while getopts ":t:i:p:s:r:u:he" optchar; do
case "${optchar}" in
q) test_suite=${OPTARG} ;;
t) installer_type=${OPTARG} ;;
p) pod_name=${OPTARG} ;;
s) scenario=${OPTARG} ;;
r) testapi_url=${OPTARG} ;;
+ u) sut=${OPTARG} ;;
h) usage
exit 0
;;
pod_name=${pod_name:-$NODE_NAME}
scenario=${scenario:-$SCENARIO}
testapi_url=${testapi_url:-$TESTAPI_URL}
+sut=${sut:-host}
# we currently support fuel, apex and mcp
if [[ ! "$installer_type" =~ (fuel|apex|mcp) ]]; then
cd /home/opnfv
qtip create --project-template ${test_suite} --pod-name ${pod_name} --installer-type ${installer_type} \
---installer-host ${installer_ip} --scenario ${scenario} ${test_suite}
+--installer-host ${installer_ip} --scenario ${scenario} --sut ${sut} ${test_suite}-${sut}
-cd ${test_suite}
+cd ${test_suite}-${sut}
qtip setup
eval `ssh-agent`
qtip_package: ../../..
qtip_cache: .qtip-cache
cwd: .
-
-# TODO(zhihui) temporarily hardcode
-sut_type: vnf
\ No newline at end of file
---
-{% if sut_type == 'vnf' %}
+{% if sut == 'vnf' %}
- hosts: localhost
gather_facts: no
roles:
export TEST_SUITE='compute'
export TESTAPI_URL=''
export SSH_CREDENTIALS='/root/.ssh'
-
export WORKSPACE=${WORKSPACE:-$(pwd)}
source ${script_dir}/utils/start_services.sh
docker cp . ${TEST_SUITE}_qtip:${qtip_repo}
docker exec ${TEST_SUITE}_qtip bash -c "cd ${qtip_repo} && pip install -U -e ."
-docker exec ${TEST_SUITE}_qtip bash -x ${qtip_repo}/qtip/scripts/quickstart.sh
-echo "QTIP: Verify ${TEST_SUITE} done!"
+docker exec ${TEST_SUITE}_qtip bash -x ${qtip_repo}/qtip/scripts/quickstart.sh -u {SUT}
+
+echo "QTIP: Verify ${TEST_SUITE} on ${SUT} done!"
exit 0
source ${script_dir}/utils/start_services.sh
-docker exec ${TEST_SUITE}_qtip bash -x /home/opnfv/repos/qtip/qtip/scripts/quickstart.sh
+docker exec ${TEST_SUITE}_qtip bash -x /home/opnfv/repos/qtip/qtip/scripts/quickstart.sh -u ${SUT}
-echo "${TEST_SUITE} QPI done!"
+echo "${TEST_SUITE} QPI on ${SUT} done!"
exit 0