diff options
| author | Yoann Congal <yoann.congal@smile.fr> | 2025-05-14 23:28:52 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-16 07:13:18 +0100 |
| commit | 4ee563388944ab999648acb2d44438b41e20bb6f (patch) | |
| tree | d4f05710b02f30097f0f053c342cfb299cdee24e /bitbake/lib | |
| parent | 9bc47d6a4d23bff5999b69fa2b99e1b32eaa62fb (diff) | |
| download | poky-4ee563388944ab999648acb2d44438b41e20bb6f.tar.gz | |
bitbake: knotty: pass failed task logs through the log infrastructure
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.
(Bitbake rev: d3b3ad32da7c7ebf61814fc807f8667a37aa149b)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
| -rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 2fff1b3669..9a589a5c8e 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
| @@ -353,7 +353,7 @@ def print_event_log(event, includelogs, loglines, termfilter): | |||
| 353 | termfilter.clearFooter() | 353 | termfilter.clearFooter() |
| 354 | bb.error("Logfile of failure stored in: %s" % logfile) | 354 | bb.error("Logfile of failure stored in: %s" % logfile) |
| 355 | if includelogs and not event.errprinted: | 355 | if includelogs and not event.errprinted: |
| 356 | print("Log data follows:") | 356 | bb.plain("Log data follows:") |
| 357 | f = open(logfile, "r") | 357 | f = open(logfile, "r") |
| 358 | lines = [] | 358 | lines = [] |
| 359 | while True: | 359 | while True: |
| @@ -366,11 +366,11 @@ def print_event_log(event, includelogs, loglines, termfilter): | |||
| 366 | if len(lines) > int(loglines): | 366 | if len(lines) > int(loglines): |
| 367 | lines.pop(0) | 367 | lines.pop(0) |
| 368 | else: | 368 | else: |
| 369 | print('| %s' % l) | 369 | bb.plain('| %s' % l) |
| 370 | f.close() | 370 | f.close() |
| 371 | if lines: | 371 | if lines: |
| 372 | for line in lines: | 372 | for line in lines: |
| 373 | print(line) | 373 | bb.plain(line) |
| 374 | 374 | ||
| 375 | def _log_settings_from_server(server, observe_only): | 375 | def _log_settings_from_server(server, observe_only): |
| 376 | # Get values of variables which control our output | 376 | # Get values of variables which control our output |
