aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocker/run_tests.sh15
-rw-r--r--docs/userguide/index.rst7
2 files changed, 16 insertions, 6 deletions
diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index 7cb06ab8..c0bf06a2 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
diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst
index 994d76c2..df4e200d 100644
--- a/docs/userguide/index.rst
+++ b/docs/userguide/index.rst
@@ -287,23 +287,26 @@ The script run_tests.sh has several options::
where:
-h|--help show this help text
-r|--report push results to database (false by default)
+ -n|--no-clean do not clean up 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. Separated by comma.
examples:
run_tests.sh
run_tests.sh --test vping,odl
- run_tests.sh -t tempest,rally
+ run_tests.sh -t tempest,rally --no-clean
The -o option can be used to run the container offline (in case you are in a summit where there is no Internet connection...). It is an experimental option.
The -r option is used by the Continuous Integration in order to push the test results into a test collection database, see in next section for details. In manual mode, you must not use it, your try will be anyway probably rejected as your POD must be declared in the database to collect the data.
+The -n option is used for preserving all the existing OpenStack resources after execution test cases.
+
The -t option can be used to specify the list of test you want to launch, by default Functest will try to launch all its test suites in the following order vPing, odl, Tempest, vIMS, Rally. You may launch only one single test by using -t <the test you want to launch>
Within Tempest test suite you can define which test cases you want to execute in your environment by editing test_list.txt file before executing run_tests.sh script.
-Please note that Functest includes cleaning mechanism in order to remove everything except what was present after a fresh install. If you create your own VMs, tenants, networks etc. and then launch Functest, they all will be deleted after executing the tests. Be carefull or comment the cleaning phase in run_test.sh (comment call to clean_openstack.py). However, be aware that Tempest and Rally create of lot of resources (users, tenants, networks, volumes etc.) that are not always properly cleaned, so this cleaning function has been set to keep the system as clean as possible after a full Functest run.
+Please note that Functest includes cleaning mechanism in order to remove everything except what was present after a fresh install. If you create your own VMs, tenants, networks etc. and then launch Functest, they all will be deleted after executing the tests. Use --no-clean option with run_test.sh in order to preserve all the existing resources. However, be aware that Tempest and Rally create of lot of resources (users, tenants, networks, volumes etc.) that are not always properly cleaned, so this cleaning function has been set to keep the system as clean as possible after a full Functest run.
You may also add you own test by adding a section into the function run_test()