From 9d597b415d92afca3b1b4bbacbb8f6276a25921a Mon Sep 17 00:00:00 2001 From: Juha Kosonen Date: Fri, 22 Apr 2016 07:21:29 +0000 Subject: Introduce a sanity test mode for Rally test In a sanity test mode the number of iterations is reduced and only a subset of tests is executed. JIRA: FUNCTEST-220 Change-Id: I722f12b8cc6df29bfcb81b8798d8d0802b207d94 Signed-off-by: Juha Kosonen --- testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'testcases/VIM/OpenStack/CI/libraries') diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index 41c359cc7..562c2e58e 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -60,6 +60,9 @@ parser.add_argument("-v", "--verbose", parser.add_argument("-n", "--noclean", help="Don't clean the created resources for this test.", action="store_true") +parser.add_argument("-z", "--sanity", + help="Sanity test mode, execute only a subset of tests", + action="store_true") args = parser.parse_args() @@ -107,7 +110,6 @@ TENANTS_AMOUNT = 3 ITERATIONS_AMOUNT = 10 CONCURRENCY = 4 -### RESULTS_DIR = functest_yaml.get("general").get("directories"). \ get("dir_rally_res") TEMPEST_CONF_FILE = functest_yaml.get("general").get("directories"). \ @@ -196,7 +198,6 @@ def live_migration_supported(): def build_task_args(test_file_name): task_args = {'service_list': [test_file_name]} - task_args['smoke'] = args.smoke task_args['image_name'] = GLANCE_IMAGE_NAME task_args['flavor_name'] = FLAVOR_NAME task_args['glance_image_location'] = GLANCE_IMAGE_PATH @@ -207,6 +208,13 @@ def build_task_args(test_file_name): task_args['iterations'] = ITERATIONS_AMOUNT 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 = openstack_utils.get_external_net(client_dict['neutron']) if ext_net: task_args['floating_network'] = str(ext_net) -- cgit 1.2.3-korg