diff options
author | Viktor Tikkanen <viktor.tikkanen@nokia.com> | 2016-01-22 12:25:41 +0200 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-01-22 12:19:49 +0000 |
commit | b5a40830c4945dcf6809773bd099e819a3857ec3 (patch) | |
tree | 3bdafe1448f6b1268495aa47dbe77d957440bc3d /docker/run_tests.sh | |
parent | 184b838d3b6e21004cdae7b2fda9619c0e65516e (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>
(cherry picked from commit dce18f616c5c0bf019f72c68c872570f26d2978b)
Diffstat (limited to 'docker/run_tests.sh')
-rwxr-xr-x | docker/run_tests.sh | 15 |
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 |