From c84024e777a124bc3a6ac875e3d8504de855a937 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 10 Feb 2016 18:14:52 +0100 Subject: Add -n|--no-clean flag to vPing,Tempest,Rally,vIMS scripts Use --no-clean flag in run_tests.sh to tell the test scripts to cleanup or not the resources Change-Id: I597eca5199e1eaf16b1f03a223222d33e4adf170 Signed-off-by: jose.lausuch (cherry picked from commit abc81e24d33b9bf8d2f8fb05dc5f5f57443abe93) --- docker/run_tests.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'docker') diff --git a/docker/run_tests.sh b/docker/run_tests.sh index 7dc7f0586..596c80d80 100755 --- a/docker/run_tests.sh +++ b/docker/run_tests.sh @@ -82,16 +82,20 @@ function run_test(){ echo " Running test case: $i" echo "----------------------------------------------" echo "" + clean_flag="" + if [ $clean == "false" ]; then + clean_flag="-n" + case $test_name in "vping_ssh") info "Running vPing-SSH test..." python ${FUNCTEST_REPO_DIR}/testcases/vPing/CI/libraries/vPing_ssh.py \ - --debug ${report} + --debug $clean_flag ${report} ;; "vping_userdata") info "Running vPing-userdata test... " python ${FUNCTEST_REPO_DIR}/testcases/vPing/CI/libraries/vPing_userdata.py \ - --debug ${report} + --debug $clean_flag ${report} ;; "odl") info "Running ODL test..." @@ -110,7 +114,7 @@ function run_test(){ "tempest") info "Running Tempest tests..." python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_tempest.py \ - --debug -m custom ${report} + --debug -m $clean_flag custom ${report} # save tempest.conf for further troubleshooting tempest_conf="${RALLY_VENV_DIR}/tempest/for-deployment-*/tempest.conf" if [ -f ${tempest_conf} ]; then @@ -121,13 +125,13 @@ function run_test(){ "vims") info "Running vIMS test..." python ${FUNCTEST_REPO_DIR}/testcases/vIMS/CI/vIMS.py \ - --debug ${report} + --debug $clean_flag ${report} clean_openstack ;; "rally") info "Running Rally benchmark suite..." python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py \ - --debug all ${report} + --debug $clean_flag all ${report} clean_openstack ;; -- cgit 1.2.3-korg