summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-03-31 08:46:56 +0000
committerxudan <xudan16@huawei.com>2017-03-31 08:46:56 +0000
commitf8ba317fc1f518e6ff160deea09bb17b53094a9f (patch)
treebca8d0dbe77239dd1d54e6b9f7a54f36660e8b5c
parentaa8654d4f3f727f99016aaa540c8d5aa3f79edcb (diff)
dovetail tool: change results dir into $DOVETAIL_HOME/results
JIRA: DOVETAIL-381 Now DoveTail's results dir is defined in $DOVETAIL_HOME/dovetail/conf/dovetail_config.yml, and its default value is /home/opnfv/dovetail/results. Since customer's jumphost may not have this dir and they don't want to create it, Dovetail needs to change this dir into $DOVETAIL_HOME/results. Change-Id: I616fb2da87bcfaabfd78d8762897e378168f694d Signed-off-by: xudan <xudan16@huawei.com>
-rw-r--r--dovetail/conf/dovetail_config.yml1
-rwxr-xr-xdovetail/run.py7
2 files changed, 7 insertions, 1 deletions
diff --git a/dovetail/conf/dovetail_config.yml b/dovetail/conf/dovetail_config.yml
index b8174bdb..c7a69efa 100644
--- a/dovetail/conf/dovetail_config.yml
+++ b/dovetail/conf/dovetail_config.yml
@@ -1,5 +1,4 @@
---
-result_dir: /home/opnfv/dovetail/results
report_file: 'dovetail_report.txt'
cli_file_name: 'cmd_config.yml'
report_dest: 'file'
diff --git a/dovetail/run.py b/dovetail/run.py
index 828a2b70..f6ce4929 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -153,10 +153,17 @@ def clean_results_dir():
raise SystemExit(1)
+def get_result_path():
+ dovetail_home = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+ result_path = os.path.join(dovetail_home, 'results')
+ dt_cfg.dovetail_config['result_dir'] = result_path
+
+
def main(*args, **kwargs):
"""Dovetail compliance test entry!"""
build_tag = "daily-master-%s" % str(uuid.uuid4())
dt_cfg.dovetail_config['build_tag'] = build_tag
+ get_result_path()
clean_results_dir()
if kwargs['debug']:
os.environ['DEBUG'] = 'true'