summaryrefslogtreecommitdiffstats
path: root/dovetail/run.py
diff options
context:
space:
mode:
authorGeorg Kunz <georg.kunz@ericsson.com>2018-06-22 09:26:36 +0200
committerGeorg Kunz <georg.kunz@ericsson.com>2018-07-24 16:38:25 +0200
commit947f1bf0147c40971fdae36feecd477ab3caf3b8 (patch)
tree5cad79bea5cb0490df591445c64017c12203ef88 /dovetail/run.py
parent69500f77438eb6fccbb37921e612a3179c311313 (diff)
Making the results file a proper json file
The results.json file is currently not a properly formated json file, but contains one json structure per line/testcase. Whit this change, all test results are being collected at runtime and then written to a properly formated json file at the end of a test run. Moreover, this patch introduces 'mandatory' and 'optional' sections to the test suites definition files in order to clearly indicate if a test is part of the corresponding test scope. The web portal needs to be adapted accordingly to be able to read the new results file. JIRA: DOVETAIL-672 Change-Id: Id0706c7e82622fc9c2c2fece26b2d6c07c1580be Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
Diffstat (limited to 'dovetail/run.py')
-rwxr-xr-xdovetail/run.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index 84a448f6..8d4b7f8d 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -221,11 +221,15 @@ def check_testcase_list(testcase_list, logger=None):
return None
-# If specify 'testcase' with CLI, ignore 'testsuite' and 'testarea'
-# If not specify 'testcase', check combination of 'testsuite' and 'testarea'
def get_testcase_list(logger=None, **kwargs):
Testcase.load()
testcase_list = kwargs['testcase']
+
+ # If specify 'testcase' on the CLI, ignore 'testsuite' and 'testarea'. In
+ # this case, all test cases are marked as mandatory=false in the result
+ # file because there is no testsuite to relate to.
+ # If 'testcase' is not specified on the CLI, check the combination of
+ # 'testsuite' and 'testarea'
if testcase_list:
return check_testcase_list(testcase_list, logger)
@@ -238,7 +242,8 @@ def get_testcase_list(logger=None, **kwargs):
if testsuite_validation and testarea_validation:
testsuite_yaml = load_testsuite(testsuite)
- testcase_list = Testcase.get_testcase_list(testsuite_yaml, testarea)
+ testcase_list = Testcase.get_testcases_for_testsuite(testsuite_yaml,
+ testarea)
return check_testcase_list(testcase_list, logger)
elif not testsuite_validation:
logger.error('Test suite {} is not defined.'.format(testsuite))