aboutsummaryrefslogtreecommitdiffstats
path: root/ci/run_tests.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-06-30 14:12:54 +0200
committerJose Lausuch <jose.lausuch@ericsson.com>2016-07-04 07:27:32 +0000
commitbbc47d487f06da2906116e5ade134e11c4221786 (patch)
treed52c4ded1b3774b449c8d89b961ab17b0d28e7c5 /ci/run_tests.py
parent7388d059ff9f4efed594582ded843f795e56c9fa (diff)
Change OpenStack clean behaviour
JIRA: FUNCTEST-236 The openstack snapshot generation is now triggered before running a test case and removed from prepare_env Change-Id: I4d1bc95dedd7f59d4b1d5866f288e1c1a70ec69e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'ci/run_tests.py')
-rw-r--r--ci/run_tests.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py
index 5dba18190..29b01d7ff 100644
--- a/ci/run_tests.py
+++ b/ci/run_tests.py
@@ -14,13 +14,13 @@ import re
import sys
import functest.ci.tier_builder as tb
-import functest.utils.clean_openstack as clean_os
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
+import functest.utils.openstack_clean as os_clean
+import functest.utils.openstack_snapshot as os_snapshot
import functest.utils.openstack_utils as os_utils
-""" arguments """
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--test", dest="test", action='store',
help="Test case or tier (group of tests) to be executed. "
@@ -61,8 +61,13 @@ def source_rc_file():
os_utils.source_credentials(rc_file)
+def generate_os_snapshot():
+ logger.debug("Generating OpenStack snapshot...")
+ os_snapshot.main()
+
+
def cleanup():
- clean_os.main()
+ os_clean.main()
def run_test(test):
@@ -71,6 +76,9 @@ def run_test(test):
logger.info("Running test case '%s'..." % test_name)
print_separator("=")
logger.debug("\n%s" % test)
+
+ generate_os_snapshot()
+
flags = (" -t %s" % (test_name))
if REPORT_FLAG:
flags += " -r"