self.tc.logger.info("RESULTS:")
result = {}
+ logs = {}
if hasattr(self.tc, "extraresults"):
result = self.tc.extraresults
if hasattr(d, 'oeid'):
oeid = d.oeid
- self.tc.logger.info("RESULTS - %s - Testcase %s: %s" % (case.id(), oeid, status))
- result[case.id()] = {'status': status, 'log': log}
+ if status not in logs:
+ logs[status] = []
+ logs[status].append("RESULTS - %s - Testcase %s: %s" % (case.id(), oeid, status))
+ if log:
+ result[case.id()] = {'status': status, 'log': log}
+ else:
+ result[case.id()] = {'status': status}
+
+ for i in ['PASSED', 'SKIPPED', 'EXPECTEDFAIL', 'ERROR', 'FAILED', 'UNKNOWN']:
+ if i not in logs:
+ continue
+ for l in logs[i]:
+ self.tc.logger.info(l)
if json_file_dir:
tresultjsonhelper = OETestResultJSONHelper()