summaryrefslogtreecommitdiffstats
path: root/dovetail/run.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-09-25 23:30:08 -0400
committerxudan <xudan16@huawei.com>2017-09-25 23:30:08 -0400
commit186cdc71bf9bdd00be1df87d90d1a4c57790208c (patch)
tree7849337a1bd5da7f036183903189000dba741bbb /dovetail/run.py
parent6f47c82d4b6f830863ff1330163d869baa6c7eec (diff)
Support to run mandatory or optional test cases separately
1. Currently, dovetail can run a test suite or a test area in that test suite. 2. The test areas in one test suite are not divided into optional and mandatory. 3. Split them and support to run just mandatory or optional. 4. Support to run multiple test areas. JIRA: DOVETAIL-505 Change-Id: I42cd7b4e11c3e3674c806e9bc999b782bf5c85c6 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/run.py')
-rwxr-xr-xdovetail/run.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index 1133b864..eb2cc968 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -38,14 +38,10 @@ def load_testcase():
def run_test(testsuite, testarea, logger):
- testarea_list = []
- for value in testsuite['testcases_list']:
- if value is not None and (testarea == 'full' or testarea in value):
- testarea_list.append(value)
-
+ testcase_list = Testcase.get_testcase_list(testsuite, testarea)
duration = 0
start_time = time.time()
- for testcase_name in testarea_list:
+ for testcase_name in testcase_list:
logger.info('>>[testcase]: {}'.format(testcase_name))
testcase = Testcase.get(testcase_name)
if testcase is None:
@@ -275,14 +271,11 @@ def main(*args, **kwargs):
else:
dt_cfg.dovetail_config['offline'] = False
- testarea = kwargs['testarea']
+ origin_testarea = kwargs['testarea']
testsuite_validation = False
- testarea_validation = False
- if (testarea == 'full') or \
- (testarea in dt_cfg.dovetail_config['testarea_supported']):
- testarea_validation = True
if kwargs['testsuite'] in dt_cfg.dovetail_config['testsuite_supported']:
testsuite_validation = True
+ testarea_validation, testarea = Testcase.check_testarea(origin_testarea)
if testsuite_validation and testarea_validation:
testsuite_yaml = load_testsuite(kwargs['testsuite'])
load_testcase()
@@ -292,7 +285,7 @@ def main(*args, **kwargs):
Report.save_logs()
else:
logger.error('Invalid input commands, testsuite {} testarea {}'
- .format(kwargs['testsuite'], testarea))
+ .format(kwargs['testsuite'], origin_testarea))
dt_cfg.load_config_files()