summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-13 21:11:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-14 11:14:40 +0000
commit5c590a3733262d2450c1006d322ed64c18b82795 (patch)
tree9643a84e9ea12856b7b2b96ef052268793749176 /meta
parentcc08d4bad268aa24f1b6db4b831c5ba65d6e74b1 (diff)
downloadpoky-5c590a3733262d2450c1006d322ed64c18b82795.tar.gz
oeqa/runner: Sort the test result output by result class
We want to see failures/errors listed last since this is the most easily visible part of the log on consoles or autobuilder output and makes human processing easier rather than having to scroll up and scan for a single failure. (From OE-Core rev: 7954b19020c28a4120bc1671aa81b9e1e2b05fa2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/core/runner.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index e8f9ee0109..7035adfaae 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -122,6 +122,7 @@ class OETestResult(_TestResult):
122 self.tc.logger.info("RESULTS:") 122 self.tc.logger.info("RESULTS:")
123 123
124 result = {} 124 result = {}
125 logs = {}
125 if hasattr(self.tc, "extraresults"): 126 if hasattr(self.tc, "extraresults"):
126 result = self.tc.extraresults 127 result = self.tc.extraresults
127 128
@@ -140,12 +141,20 @@ class OETestResult(_TestResult):
140 if case.id() in self.starttime and case.id() in self.endtime: 141 if case.id() in self.starttime and case.id() in self.endtime:
141 t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)" 142 t = " (" + "{0:.2f}".format(self.endtime[case.id()] - self.starttime[case.id()]) + "s)"
142 143
143 self.tc.logger.info("RESULTS - %s - Testcase %s: %s%s" % (case.id(), oeid, status, t)) 144 if status not in logs:
145 logs[status] = []
146 logs[status].append("RESULTS - %s - Testcase %s: %s%s" % (case.id(), oeid, status, t))
144 if log: 147 if log:
145 result[case.id()] = {'status': status, 'log': log} 148 result[case.id()] = {'status': status, 'log': log}
146 else: 149 else:
147 result[case.id()] = {'status': status} 150 result[case.id()] = {'status': status}
148 151
152 for i in ['PASSED', 'SKIPPED', 'EXPECTEDFAIL', 'ERROR', 'FAILED', 'UNKNOWN']:
153 if i not in logs:
154 continue
155 for l in logs[i]:
156 self.tc.logger.info(l)
157
149 if json_file_dir: 158 if json_file_dir:
150 tresultjsonhelper = OETestResultJSONHelper() 159 tresultjsonhelper = OETestResultJSONHelper()
151 tresultjsonhelper.dump_testresult_file(json_file_dir, configuration, result_id, result) 160 tresultjsonhelper.dump_testresult_file(json_file_dir, configuration, result_id, result)