summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-01-21 23:49:17 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-01-21 23:49:17 +0000
commit5ebad0d500562a132067b423bb6711e8893f2859 (patch)
tree395567a09b82a0bf89331d32f927fbe77496ec79 /bitbake/lib/bb/ui/knotty.py
parent5c62833766048b83c0d7ea9e77194b9ca6af7fb1 (diff)
downloadpoky-5ebad0d500562a132067b423bb6711e8893f2859.tar.gz
knotty: Improve task failure message handling using the uihelper code
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
-rw-r--r--bitbake/lib/bb/ui/knotty.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index c69fd6ca64..7264c7916c 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -23,6 +23,9 @@ import os
23import sys 23import sys
24import itertools 24import itertools
25import xmlrpclib 25import xmlrpclib
26from bb import ui
27from bb.ui import uihelper
28
26 29
27parsespin = itertools.cycle( r'|/-\\' ) 30parsespin = itertools.cycle( r'|/-\\' )
28 31
@@ -32,6 +35,8 @@ def init(server, eventHandler):
32 includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"]) 35 includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
33 loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"]) 36 loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
34 37
38 helper = uihelper.BBUIHelper()
39
35 try: 40 try:
36 cmdline = server.runCommand(["getCmdLineAction"]) 41 cmdline = server.runCommand(["getCmdLineAction"])
37 #print cmdline 42 #print cmdline
@@ -53,6 +58,19 @@ def init(server, eventHandler):
53 if event is None: 58 if event is None:
54 continue 59 continue
55 #print event 60 #print event
61 helper.eventHandler(event)
62 if isinstance(event, bb.runqueue.runQueueExitWait):
63 if not shutdown:
64 shutdown = 1
65 if shutdown and helper.needUpdate:
66 activetasks, failedtasks = helper.getTasks()
67 if activetasks:
68 print "Waiting for %s active tasks to finish:" % len(activetasks)
69 tasknum = 1
70 for task in activetasks:
71 print "%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task)
72 tasknum = tasknum + 1
73
56 if isinstance(event, bb.msg.MsgPlain): 74 if isinstance(event, bb.msg.MsgPlain):
57 print event._message 75 print event._message
58 continue 76 continue
@@ -139,6 +157,8 @@ def init(server, eventHandler):
139 continue 157 continue
140 if isinstance(event, bb.runqueue.runQueueEvent): 158 if isinstance(event, bb.runqueue.runQueueEvent):
141 continue 159 continue
160 if isinstance(event, bb.runqueue.runQueueExitWait):
161 continue
142 if isinstance(event, bb.event.StampUpdate): 162 if isinstance(event, bb.event.StampUpdate):
143 continue 163 continue
144 if isinstance(event, bb.event.ConfigParsed): 164 if isinstance(event, bb.event.ConfigParsed):