[OE-core] [PATCH 2/2] oeqa/runner: Print any errors/failures early

Richard Purdie richard.purdie at linuxfoundation.org
Thu Aug 23 06:32:15 UTC 2018


Its a pain to have to wait until oe-selftest finishes to see the
failures for example.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/core/runner.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 73f41d9f1cf..eeb625b7ff7 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -56,6 +56,14 @@ class OETestResult(_TestResult):
         if test.id() in self.progressinfo:
             self.tc.logger.info(self.progressinfo[test.id()])
 
+        # Print the errors/failures early to aid/speed debugging, its a pain
+        # to wait until selftest finishes to see them.
+        for t in ['failures', 'errors', 'skipped', 'expectedFailures']:
+            for (scase, msg) in getattr(self, t):
+                if test.id() == scase.id():
+                    self.tc.logger.info(str(msg))
+                    break
+
     def logSummary(self, component, context_msg=''):
         elapsed_time = self.tc._run_end_time - self.tc._run_start_time
         self.tc.logger.info("SUMMARY:")
-- 
2.17.1




More information about the Openembedded-core mailing list