From 08d887595903aa7127b42eaa8a04add2a09244fe Mon Sep 17 00:00:00 2001 From: xudan Date: Sat, 6 May 2017 04:46:17 -0400 Subject: Support Yardstick to push results to database JIRA: DOVETAIL-421 1. Yardstick is working on supporting push results to mongoDB. see https://gerrit.opnfv.org/gerrit/#/c/34091/ 2. make Dovetail supporting push results to database too when user choose to report to database. Change-Id: Iee06ad6be59dad62ac4f985f4a982fb5ff93a592 Signed-off-by: xudan --- dovetail/run.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'dovetail/run.py') diff --git a/dovetail/run.py b/dovetail/run.py index 5b4dca8e..a191e399 100755 --- a/dovetail/run.py +++ b/dovetail/run.py @@ -77,19 +77,14 @@ def check_tc_result(testcase, logger): 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')) + if dt_utils.store_db_results(dt_cfg.dovetail_config['report_dest'], + dt_cfg.dovetail_config['build_tag'], + testcase.name(), dovetail_result, + logger): + logger.info("Results have been pushed to database and stored " + "with local file %s.", dovetail_result) else: - if dt_utils.store_db_results(dt_cfg.dovetail_config['report_dest'], - dt_cfg.dovetail_config['build_tag'], - testcase.name(), dovetail_result, - logger): - 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.") + logger.error("Fail to push results to database.") if dt_cfg.dovetail_config['report_dest'] == "file": if validate_type.lower() == 'yardstick': logger.info("Results have been stored with file %s.", -- cgit 1.2.3-korg