summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-29 13:48:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-29 17:01:34 +0000
commitda6aef0b6bd4655805f7f743858d4e04341f75ed (patch)
tree7566f5a50a87f5af71499017d97c0f0d37ed938e
parentc272079d662237b1b9f87940c88cbadaeda9a9d1 (diff)
downloadopenembedded-core-contrib-da6aef0b6bd4655805f7f743858d4e04341f75ed.tar.gz
openembedded-core-contrib-da6aef0b6bd4655805f7f743858d4e04341f75ed.tar.bz2
openembedded-core-contrib-da6aef0b6bd4655805f7f743858d4e04341f75ed.zip
oeqa/core/runner: Don't add empty log entries
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>
-rw-r--r--meta/lib/oeqa/core/runner.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index d6d5afe0c7..67756c3867 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -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()