Delete the hardcoding parameter "sut_type" 21/52721/1
authorzhihui wu <wu.zhihui1@zte.com.cn>
Tue, 27 Feb 2018 08:03:07 +0000 (16:03 +0800)
committerzhihui wu <wu.zhihui1@zte.com.cn>
Tue, 27 Feb 2018 09:09:56 +0000 (17:09 +0800)
SUT already can be passed from CLI.

Change-Id: I3ff68ebf94ce25dfc0a42964cf1aafc8e58da4b6
Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
qtip/scripts/quickstart.sh
resources/ansible_roles/qtip-generator/defaults/main.yml
resources/ansible_roles/qtip-generator/files/compute/setup.yml
tests/ci/experimental.sh
tests/ci/periodic.sh

index b430aa3..f9becda 100644 (file)
@@ -30,7 +30,7 @@ verify_connectivity(){
 }
 
 #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} ;;
@@ -38,6 +38,7 @@ while getopts ":t:i:p:s:r:he" optchar; do
        p) pod_name=${OPTARG} ;;
        s) scenario=${OPTARG} ;;
        r) testapi_url=${OPTARG} ;;
+       u) sut=${OPTARG} ;;
        h) usage
           exit 0
           ;;
@@ -55,6 +56,7 @@ test_suite=${test_suite:-$TEST_SUITE}
 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
@@ -76,9 +78,9 @@ esac
 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`
index 300dadf..6665d11 100644 (file)
@@ -26,6 +26,3 @@ project_template: 'compute'
 qtip_package: ../../..
 qtip_cache: .qtip-cache
 cwd: .
-
-# TODO(zhihui) temporarily hardcode
-sut_type: vnf
\ No newline at end of file
index 1053761..037f574 100644 (file)
@@ -11,7 +11,7 @@
 
 ---
 
-{% if sut_type == 'vnf' %}
+{% if sut == 'vnf' %}
 - hosts: localhost
   gather_facts: no
   roles:
index e4bcc57..53de1db 100755 (executable)
@@ -20,7 +20,6 @@ export CI_DEBUG='false'
 export TEST_SUITE='compute'
 export TESTAPI_URL=''
 export SSH_CREDENTIALS='/root/.ssh'
-
 export WORKSPACE=${WORKSPACE:-$(pwd)}
 
 source ${script_dir}/utils/start_services.sh
@@ -31,7 +30,8 @@ qtip_repo='/home/opnfv/repos/qtip'
 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
index 87fa762..5bbdf51 100755 (executable)
@@ -13,8 +13,8 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 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