Don't generate tar file when run without pushing results to DB 07/43407/1
authorxudan <xudan16@huawei.com>
Thu, 28 Sep 2017 07:36:55 +0000 (03:36 -0400)
committerxudan <xudan16@huawei.com>
Thu, 28 Sep 2017 07:36:55 +0000 (03:36 -0400)
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>
dovetail/run.py

index 1133b86..26838bc 100755 (executable)
@@ -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))