From c29e36280713aa232a19e0d3612bae0948601837 Mon Sep 17 00:00:00 2001 From: zhihui wu Date: Tue, 27 Feb 2018 16:03:07 +0800 Subject: Delete the hardcoding parameter "sut_type" SUT already can be passed from CLI. Change-Id: I3ff68ebf94ce25dfc0a42964cf1aafc8e58da4b6 Signed-off-by: zhihui wu --- qtip/scripts/quickstart.sh | 8 +++++--- resources/ansible_roles/qtip-generator/defaults/main.yml | 3 --- resources/ansible_roles/qtip-generator/files/compute/setup.yml | 2 +- tests/ci/experimental.sh | 6 +++--- tests/ci/periodic.sh | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/qtip/scripts/quickstart.sh b/qtip/scripts/quickstart.sh index b430aa3f..f9becda8 100644 --- a/qtip/scripts/quickstart.sh +++ b/qtip/scripts/quickstart.sh @@ -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` diff --git a/resources/ansible_roles/qtip-generator/defaults/main.yml b/resources/ansible_roles/qtip-generator/defaults/main.yml index 300dadf0..6665d11f 100644 --- a/resources/ansible_roles/qtip-generator/defaults/main.yml +++ b/resources/ansible_roles/qtip-generator/defaults/main.yml @@ -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 diff --git a/resources/ansible_roles/qtip-generator/files/compute/setup.yml b/resources/ansible_roles/qtip-generator/files/compute/setup.yml index 10537615..037f5746 100644 --- a/resources/ansible_roles/qtip-generator/files/compute/setup.yml +++ b/resources/ansible_roles/qtip-generator/files/compute/setup.yml @@ -11,7 +11,7 @@ --- -{% if sut_type == 'vnf' %} +{% if sut == 'vnf' %} - hosts: localhost gather_facts: no roles: diff --git a/tests/ci/experimental.sh b/tests/ci/experimental.sh index e4bcc577..53de1db4 100755 --- a/tests/ci/experimental.sh +++ b/tests/ci/experimental.sh @@ -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 diff --git a/tests/ci/periodic.sh b/tests/ci/periodic.sh index 87fa7627..5bbdf517 100755 --- a/tests/ci/periodic.sh +++ b/tests/ci/periodic.sh @@ -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 -- cgit 1.2.3-korg