summaryrefslogtreecommitdiffstats
path: root/dovetail/run.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-05-03 06:11:51 +0000
committerxudan <xudan16@huawei.com>2017-05-04 02:40:07 +0000
commit17466cf17b36bf6fcca00894bcedc8c88df25a4b (patch)
tree4ae6f76863ce46b00125f4667213bf37d3586479 /dovetail/run.py
parentbae197167f137c478f8bb3268d9e047a6b6839b6 (diff)
Get results json data from database
JIRA: DOVETAIL-417 1. If report results with files, all results will be stored in local files. 2. If report to database, will get results from database and stored with file results.json Change-Id: Ic30037bd66cd37042f82b75fac2043a876e21c6f Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/run.py')
-rwxr-xr-xdovetail/run.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index 4bea9b53..5b4dca8e 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -74,17 +74,20 @@ 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']
+ dovetail_result = os.path.join(result_dir,
+ dt_cfg.dovetail_config['result_file'])
if dt_cfg.dovetail_config['report_dest'].startswith("http"):
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'],
+ if dt_utils.store_db_results(dt_cfg.dovetail_config['report_dest'],
dt_cfg.dovetail_config['build_tag'],
- testcase.name(),
+ testcase.name(), dovetail_result,
logger):
- logger.info("Results have been pushed to database.")
+ logger.info("Results have been pushed to database and stored "
+ "with local file %s.", dovetail_result)
else:
logger.error("Fail to push results to database.")
if dt_cfg.dovetail_config['report_dest'] == "file":