summaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack/rally/run_rally-cert.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-10-06 15:44:32 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-10-06 15:44:32 +0000
commita62648d0dbb85a09a267edaa083df8f2cd0a9fbc (patch)
tree3bdf3e15dbc3563a0cd2b4c706e77aee07a5015f /testcases/OpenStack/rally/run_rally-cert.py
parent8c4aa3c9cca399a804ae0f8747855819aa471430 (diff)
parente80c3b71aab51aa0a54b8c27047b987aa4345cd2 (diff)
Merge "Refactor rally task scenario files"
Diffstat (limited to 'testcases/OpenStack/rally/run_rally-cert.py')
-rwxr-xr-xtestcases/OpenStack/rally/run_rally-cert.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py
index 29fd0a334..d35639cc8 100755
--- a/testcases/OpenStack/rally/run_rally-cert.py
+++ b/testcases/OpenStack/rally/run_rally-cert.py
@@ -75,6 +75,8 @@ logger = ft_logger.Logger("run_rally").getLogger()
HOME = os.environ['HOME'] + "/"
RALLY_DIR = ft_utils.FUNCTEST_REPO + '/' + \
ft_utils.get_functest_config('general.directories.dir_rally')
+SANITY_MODE_DIR = RALLY_DIR + "scenario/sanity"
+FULL_MODE_DIR = RALLY_DIR + "scenario/full"
TEMPLATE_DIR = RALLY_DIR + "scenario/templates"
SUPPORT_DIR = RALLY_DIR + "scenario/support"
TEMP_DIR = RALLY_DIR + "var"
@@ -173,10 +175,8 @@ def build_task_args(test_file_name):
task_args['concurrency'] = CONCURRENCY
if args.sanity:
- task_args['full_mode'] = False
task_args['smoke'] = True
else:
- task_args['full_mode'] = True
task_args['smoke'] = args.smoke
ext_net = os_utils.get_external_net(neutron_client)
@@ -319,8 +319,16 @@ def prepare_test_list(test_name):
scenario_file_name = '{}opnfv-{}.yaml'.format(RALLY_DIR + "scenario/",
test_name)
if not os.path.exists(scenario_file_name):
- logger.info("The scenario '%s' does not exist." % scenario_file_name)
- exit(-1)
+ if args.sanity:
+ scenario_file_name = '{}opnfv-{}.yaml'.format(SANITY_MODE_DIR +
+ "/", test_name)
+ else:
+ scenario_file_name = '{}opnfv-{}.yaml'.format(FULL_MODE_DIR +
+ "/", test_name)
+ if not os.path.exists(scenario_file_name):
+ logger.info("The scenario '%s' does not exist."
+ % scenario_file_name)
+ exit(-1)
logger.debug('Scenario fetched from : {}'.format(scenario_file_name))
test_file_name = '{}opnfv-{}.yaml'.format(TEMP_DIR + "/", test_name)