diff mbox series

knotty: pass failed task logs through the log infrastructure

Message ID 20250514212851.837656-1-yoann.congal@smile.fr
State Accepted, archived
Commit d3b3ad32da7c7ebf61814fc807f8667a37aa149b
Headers show
Series knotty: pass failed task logs through the log infrastructure | expand

Commit Message

Yoann Congal May 14, 2025, 9:28 p.m. UTC
From: Yoann Congal <yoann.congal@smile.fr>

By switching from print() to bb.plain() to print failing task logs, we
allow them to be saved in BB_CONSOLELOG.

Fixes [YOCTO #15798]: This allows AB reproducibility test to save the
full log of the failing tasks and helps debugging.

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---
 lib/bb/ui/knotty.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 2fff1b36..9a589a5c 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -353,7 +353,7 @@  def print_event_log(event, includelogs, loglines, termfilter):
         termfilter.clearFooter()
         bb.error("Logfile of failure stored in: %s" % logfile)
         if includelogs and not event.errprinted:
-            print("Log data follows:")
+            bb.plain("Log data follows:")
             f = open(logfile, "r")
             lines = []
             while True:
@@ -366,11 +366,11 @@  def print_event_log(event, includelogs, loglines, termfilter):
                     if len(lines) > int(loglines):
                         lines.pop(0)
                 else:
-                    print('| %s' % l)
+                    bb.plain('| %s' % l)
             f.close()
             if lines:
                 for line in lines:
-                    print(line)
+                    bb.plain(line)
 
 def _log_settings_from_server(server, observe_only):
     # Get values of variables which control our output