summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/utils/concurrencytest.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-21 23:20:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-12-22 23:09:00 +0000
commiteac47bff704f9169237f68d48ac3726ccf97de3d (patch)
tree395e1aebdfff10577c2980148c0881d8ed324404 /meta/lib/oeqa/core/utils/concurrencytest.py
parentbea2896a2e31db534f06ceba2d532f7e95bc74e2 (diff)
downloadpoky-eac47bff704f9169237f68d48ac3726ccf97de3d.tar.gz
oeqa/concurrencytest: Add number of failures to summary output
When running oe-selftest and seeing the end of a running log, it is extremely helpful to know if there have been failures or not to save looking at the rest of the log. Add the number of failures to the summary line so that people monitoring builds have an easier time before the end totals are printed. (From OE-Core rev: 6b23996911d91f7f99774646c6db9f3490b4cb62) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core/utils/concurrencytest.py')
-rw-r--r--meta/lib/oeqa/core/utils/concurrencytest.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index 383479c959..4f77589b00 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -59,6 +59,7 @@ class BBThreadsafeForwardingResult(ThreadsafeForwardingResult):
59 self.outputbuf = output 59 self.outputbuf = output
60 self.finalresult = finalresult 60 self.finalresult = finalresult
61 self.finalresult.buffer = True 61 self.finalresult.buffer = True
62 self.target = target
62 63
63 def _add_result_with_semaphore(self, method, test, *args, **kwargs): 64 def _add_result_with_semaphore(self, method, test, *args, **kwargs):
64 self.semaphore.acquire() 65 self.semaphore.acquire()
@@ -67,13 +68,14 @@ class BBThreadsafeForwardingResult(ThreadsafeForwardingResult):
67 self.result.starttime[test.id()] = self._test_start.timestamp() 68 self.result.starttime[test.id()] = self._test_start.timestamp()
68 self.result.threadprogress[self.threadnum].append(test.id()) 69 self.result.threadprogress[self.threadnum].append(test.id())
69 totalprogress = sum(len(x) for x in self.result.threadprogress.values()) 70 totalprogress = sum(len(x) for x in self.result.threadprogress.values())
70 self.result.progressinfo[test.id()] = "%s: %s/%s %s/%s (%ss) (%s)" % ( 71 self.result.progressinfo[test.id()] = "%s: %s/%s %s/%s (%ss) (%s failed) (%s)" % (
71 self.threadnum, 72 self.threadnum,
72 len(self.result.threadprogress[self.threadnum]), 73 len(self.result.threadprogress[self.threadnum]),
73 self.totalinprocess, 74 self.totalinprocess,
74 totalprogress, 75 totalprogress,
75 self.totaltests, 76 self.totaltests,
76 "{0:.2f}".format(time.time()-self._test_start.timestamp()), 77 "{0:.2f}".format(time.time()-self._test_start.timestamp()),
78 self.target.failed_tests,
77 test.id()) 79 test.id())
78 finally: 80 finally:
79 self.semaphore.release() 81 self.semaphore.release()