]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/core/runner: Don't add empty log entries
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Oct 2018 13:48:14 +0000 (13:48 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Oct 2018 17:01:34 +0000 (17:01 +0000)
There is no point in adding empty log entries to the json result files, only
add them if there is log data.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/runner.py

index d6d5afe0c78280cff22a951d1ce9659c07d16eb6..67756c38676eaba4c6f9d0bcf2ea24a8402a31c3 100644 (file)
@@ -139,7 +139,10 @@ class OETestResult(_TestResult):
                 t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)"
 
             self.tc.logger.info("RESULTS - %s - Testcase %s: %s%s" % (case.id(), oeid, status, t))
-            result[case.id()] = {'status': status, 'log': log}
+            if log:
+                result[case.id()] = {'status': status, 'log': log}
+            else:
+                result[case.id()] = {'status': status}
 
         if json_file_dir:
             tresultjsonhelper = OETestResultJSONHelper()