summaryrefslogtreecommitdiffstats
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-16 14:31:27 +0000
commit3f2c5e0e24cc767ec023b5c54935a1dfc6306b81 (patch)
tree9615f9c46214c06bf87665c8f98b076334301018 /meta/lib
parent1123da436851f22100e9a69ac37a31b69ab0bfaf (diff)
downloadpoky-3f2c5e0e24cc767ec023b5c54935a1dfc6306b81.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: 2cc07ab253f1ba6a1f07a66051c9ba6d98cd2357) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/core/runner.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 0cb1a95c1e..f8bb23f344 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -107,6 +107,7 @@ class OETestResult(_TestResult):
107 self.tc.logger.info("RESULTS:") 107 self.tc.logger.info("RESULTS:")
108 108
109 result = {} 109 result = {}
110 logs = {}
110 if hasattr(self.tc, "extraresults"): 111 if hasattr(self.tc, "extraresults"):
111 result = self.tc.extraresults 112 result = self.tc.extraresults
112 113
@@ -121,8 +122,19 @@ class OETestResult(_TestResult):
121 if hasattr(d, 'oeid'): 122 if hasattr(d, 'oeid'):
122 oeid = d.oeid 123 oeid = d.oeid
123 124
124 self.tc.logger.info("RESULTS - %s - Testcase %s: %s" % (case.id(), oeid, status)) 125 if status not in logs:
125 result[case.id()] = {'status': status, 'log': log} 126 logs[status] = []
127 logs[status].append("RESULTS - %s - Testcase %s: %s" % (case.id(), oeid, status))
128 if log:
129 result[case.id()] = {'status': status, 'log': log}
130 else:
131 result[case.id()] = {'status': status}
132
133 for i in ['PASSED', 'SKIPPED', 'EXPECTEDFAIL', 'ERROR', 'FAILED', 'UNKNOWN']:
134 if i not in logs:
135 continue
136 for l in logs[i]:
137 self.tc.logger.info(l)
126 138
127 if json_file_dir: 139 if json_file_dir:
128 tresultjsonhelper = OETestResultJSONHelper() 140 tresultjsonhelper = OETestResultJSONHelper()