bitbake: knotty: display active tasks when printing keepAlive() message

In interactive bitbake sessions it is obvious what tasks are running
when one of them hangs or otherwise takes a long time. However, in
non-interactive sessions (such as automated builds) bitbake just prints
a message saying that it is "still alive" with no clues as to what tasks
are active still.

By simply listing the active tasks when printing the keep alive message,
we don't need to parse the bitbake log to identify which of the tasks
is still active and has presumably hung.

(Bitbake rev: cc4e7d7049f949b54b1ea7926844b3c76f361c64)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 30f6c3f175617beea8e8bb75dcf255611e3fc2fd)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2022-04-29 19:15:37 +08:00 committed by Richard Purdie
parent 99e1aff4ba
commit 638c8860eb

View File

@ -228,7 +228,9 @@ class TerminalFilter(object):
def keepAlive(self, t):
if not self.cuu:
print("Bitbake still alive (%ds)" % t)
print("Bitbake still alive (no events for %ds). Active tasks:" % t)
for t in self.helper.running_tasks:
print(t)
sys.stdout.flush()
def updateFooter(self):