summaryrefslogtreecommitdiffstats
path: root/dovetail/run.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-04-06 03:31:30 +0000
committerxudan <xudan16@huawei.com>2017-04-12 08:29:26 +0000
commit4d98856b87edbf784b12b375b5d30ab9f401d525 (patch)
tree883335d3ab11c52b45cda97b021f7bed2993f544 /dovetail/run.py
parentac766b065a8032e4aa90dafef2130292364a2483 (diff)
dovetail tool: bugfix: test cases are erroneously judged
JIRA: DOVETAIL-375 JIRA: DOVETAIL-390 1. defcore test cases are erroneously judged because of: a) defcore results json data lack some keys b) some sub-testcases' names are the same as the prefix of another sub-testcases. 2. this patch removes the extra keys and judge sub-testcases accurately. 3. remove "store_type" in functest_config.yml and yardstick_config.yml. 4. change some log levels from info to debug. Change-Id: I5f126e70309409cac66ef9a0909f1573d325098b Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/run.py')
-rwxr-xr-xdovetail/run.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index aae35e12..492046d1 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -71,9 +71,14 @@ def run_test(testsuite, testarea, logger):
def check_tc_result(testcase, logger):
+ result_dir = dt_cfg.dovetail_config['result_dir']
+ validate_type = testcase.validate_type()
+ functest_result = dt_cfg.dovetail_config['functest']['result']['file_path']
if dt_cfg.dovetail_config['report_dest'].startswith("http"):
- if testcase.validate_type() == 'yardstick':
- logger.info("Results have been stored with files.")
+ if validate_type.lower() == 'yardstick':
+ logger.info("Results have been stored with file %s.",
+ os.path.join(result_dir,
+ testcase.validate_testcase() + '.out'))
else:
if dt_utils.check_db_results(dt_cfg.dovetail_config['report_dest'],
dt_cfg.dovetail_config['build_tag'],
@@ -83,9 +88,15 @@ def check_tc_result(testcase, logger):
else:
logger.error("Fail to push results to database.")
if dt_cfg.dovetail_config['report_dest'] == "file":
- logger.info("Results have been stored with files.")
- result = Report.get_result(testcase)
- Report.check_result(testcase, result)
+ if validate_type.lower() == 'yardstick':
+ logger.info("Results have been stored with file %s.",
+ os.path.join(result_dir,
+ testcase.validate_testcase() + '.out'))
+ if validate_type.lower() == 'functest':
+ logger.info("Results have been stored with file %s.",
+ os.path.join(result_dir, functest_result))
+ # result = Report.get_result(testcase)
+ # Report.check_result(testcase, result)
def validate_input(input_dict, check_dict, logger):
@@ -211,9 +222,9 @@ def main(*args, **kwargs):
if testsuite_validation and testarea_validation:
testsuite_yaml = load_testsuite(kwargs['testsuite'])
load_testcase()
- duration = run_test(testsuite_yaml, testarea, logger)
- if dt_cfg.dovetail_config['report_dest'] == "file":
- Report.generate(testsuite_yaml, testarea, duration)
+ run_test(testsuite_yaml, testarea, logger)
+ # if dt_cfg.dovetail_config['report_dest'] == "file":
+ # Report.generate(testsuite_yaml, testarea, duration)
else:
logger.error('invalid input commands, testsuite %s testarea %s',
kwargs['testsuite'], testarea)