summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorViktor Tikkanen <viktor.tikkanen@nokia.com>2016-01-22 12:25:41 +0200
committerViktor Tikkanen <viktor.tikkanen@nokia.com>2016-01-22 12:30:41 +0200
commitdce18f616c5c0bf019f72c68c872570f26d2978b (patch)
treea3b5fd891c70b1f992b77c8b55a15f6de1e86f33 /docker
parent9b116478a6c89f5fc4f022223e89a99df001df46 (diff)
Added --no-clean option for run_tests.sh
Previously all the OpenStack resources (networks, VMs etc.) created by user were deleted after executing tempest, vims and rally test cases with run_tests.sh script. New --no-clean option can be used for preserving resources created by user so that the tests can be run also in setups with deployed stacks. Change-Id: I8c9505acf955c54b2b837d8ca916dc729c97bbca Signed-off-by: Viktor Tikkanen <viktor.tikkanen@nokia.com>
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/run_tests.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index 7cb06ab8e..c0bf06a2a 100755
--- a/docker/run_tests.sh
+++ b/docker/run_tests.sh
@@ -21,6 +21,7 @@ usage:
where:
-h|--help show this help text
-r|--report push results to database (false by default)
+ -n|--no-clean do not clean OpenStack resources after test run
-t|--test run specific set of tests
<test_name> one or more of the following: vping,odl,rally,tempest,vims,onos,promise,ovno. Separated by comma.
@@ -35,15 +36,18 @@ examples:
# NOTE: Still not 100% working when running the tests
offline=false
report=""
+clean=true
# Get the list of runnable tests
# Check if we are in CI mode
function clean_openstack(){
- echo -e "\n\nCleaning Openstack environment..."
- python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py \
- --debug
- echo -e "\n\n"
+ if [ $clean == true ]; then
+ echo -e "\n\nCleaning Openstack environment..."
+ python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py \
+ --debug
+ echo -e "\n\n"
+ fi
}
function run_test(){
@@ -169,6 +173,9 @@ while [[ $# > 0 ]]
-r|--report)
report="-r"
;;
+ -n|--no-clean)
+ clean=false
+ ;;
-t|--test|--tests)
TEST="$2"
shift