summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-09-28 03:36:55 -0400
committerxudan <xudan16@huawei.com>2017-09-28 03:36:55 -0400
commitb57330821bd12844185bf315ffc7d6a6637ba79d (patch)
tree34b11bff042d2ef3bb8c53e42189248d5a71bf3d
parent63c2e2aa4b8d86349a767f611123ceafc19fa6d6 (diff)
Don't generate tar file when run without pushing results to DB
1. Dovetail generate a tar file for uploading results to CVP web portal. 2. If users don't run with option --report, it shouldn't generate the tar file. Because users can not upload results to CVP if they don't run with --report. 3. If it generates the tar file when user run dovetail without --report, the tar file is invalid because it lacks of results.json. JIRA: DOVETAIL-511 Change-Id: I4d21f21f0b278962564d810369df03100b38f003 Signed-off-by: xudan <xudan16@huawei.com>
-rwxr-xr-xdovetail/run.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/dovetail/run.py b/dovetail/run.py
index 1133b864..26838bce 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -289,7 +289,8 @@ def main(*args, **kwargs):
duration = run_test(testsuite_yaml, testarea, logger)
if dt_cfg.dovetail_config['report_dest'] == "file":
Report.generate(testsuite_yaml, testarea, duration)
- Report.save_logs()
+ if dt_cfg.dovetail_config['report_dest'].startswith("http"):
+ Report.save_logs()
else:
logger.error('Invalid input commands, testsuite {} testarea {}'
.format(kwargs['testsuite'], testarea))