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>
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()