From a3971620dc00d459dbc0ce25082feb7099fb967f Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Thu, 31 Aug 2017 11:30:44 +1200 Subject: bitbake: tinfoil: ensure log lines get printed when tasks fail If a task fails during build_targets(), we need to print out the log lines as knotty does or the user will be missing information about the failure. (This should get some deeper refactoring, but now isn't the time for that.) (Bitbake rev: 24879df071d4803db3d39ae1d5cad852daa92f28) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/tinfoil.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/lib/bb/tinfoil.py') diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index fd17edcc58..b50ed0553f 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py @@ -714,6 +714,9 @@ class Tinfoil: eventmask.extend(extra_events) ret = self.set_event_mask(eventmask) + includelogs = self.config_data.getVar('BBINCLUDELOGS') + loglines = self.config_data.getVar('BBINCLUDELOGS_LINES') + ret = self.run_command('buildTargets', targets, task) if handle_events: result = False @@ -743,6 +746,10 @@ class Tinfoil: if event_callback and event_callback(event): continue if helper.eventHandler(event): + if isinstance(event, bb.build.TaskFailedSilent): + logger.warning("Logfile for failed setscene task is %s" % event.logfile) + elif isinstance(event, bb.build.TaskFailed): + bb.ui.knotty.print_event_log(event, includelogs, loglines, termfilter) continue if isinstance(event, bb.event.ProcessStarted): if self.quiet > 1: -- cgit v1.2.3-54-g00ecf