From: Richard Purdie Date: Mon, 29 Oct 2018 13:48:14 +0000 (+0000) Subject: oeqa/core/runner: Don't add empty log entries X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b9ef43274d2af757c162a4536530281bdaba493;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. (From OE-Core rev: da6aef0b6bd4655805f7f743858d4e04341f75ed) Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index d6d5afe0c78..67756c38676 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()