aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
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-12-06 10:21:05 +0000
commit260738158b09aea0beeca85b778aa4ab08ba1c4c (patch)
tree1bd4803404592e9cbdf538979119dd0c1ee28223 /meta/lib
parent5bc862d8f16df5611537cb51da95812e519c61f6 (diff)
downloadopenembedded-core-contrib-260738158b09aea0beeca85b778aa4ab08ba1c4c.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/lib')
-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):
self.tc.logger.info("RESULTS:")
result = {}
+ logs = {}
if hasattr(self.tc, "extraresults"):
result = self.tc.extraresults
@@ -140,12 +141,20 @@ class OETestResult(_TestResult):
if case.id() in self.starttime and case.id() in self.endtime:
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))
+ if status not in logs:
+ logs[status] = []
+ logs[status].append("RESULTS - %s - Testcase %s: %s%s" % (case.id(), oeid, status, t))
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()
tresultjsonhelper.dump_testresult_file(json_file_dir, configuration, result_id, result)