diff options
author | Leo wang <grakiss.wanglei@huawei.com> | 2017-06-06 06:39:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-06 06:39:04 +0000 |
commit | df9fb1edfad233bd2ee0fb55e80a0a9d644b7742 (patch) | |
tree | 1163ced70d1b40ddc2e4bcfe85b4f86dcf8423b0 | |
parent | 8c6b4532a230f6fbda2dd053ebadafaf7bbb6320 (diff) | |
parent | 08d887595903aa7127b42eaa8a04add2a09244fe (diff) |
Merge "Support Yardstick to push results to database"
-rw-r--r-- | dovetail/container.py | 5 | ||||
-rwxr-xr-x | dovetail/run.py | 19 |
2 files changed, 10 insertions, 14 deletions
diff --git a/dovetail/container.py b/dovetail/container.py index 2d8a9e20..39062c84 100644 --- a/dovetail/container.py +++ b/dovetail/container.py @@ -102,8 +102,9 @@ class Container(object): return None if dovetail_config['report_dest'].startswith("http"): - cls.logger.info("Yardstick can't push results to DB.") - cls.logger.info("Results will be stored with files.") + envs = envs + " -e DISPATCHER=http" + envs = envs + " -e TARGET=%s" % dovetail_config['report_dest'] + envs = envs + " -e NODE_NAME=master" log_vol = '-v %s:%s ' % (dovetail_config['result_dir'], dovetail_config["yardstick"]['result']['log']) diff --git a/dovetail/run.py b/dovetail/run.py index 00376360..84bd88f3 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': result_file = os.path.join(result_dir, testcase.name() + '.out') |