summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-06 14:58:55 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:49 +0000
commitfcba92f3548b5fd3f4073a5d100660e9e79a67ac (patch)
tree2deab36a2e216bea350eb99e522e02f793e5ca67 /bitbake
parent23735bb765216b7a6086bc700d32d338f7649cc6 (diff)
downloadpoky-fcba92f3548b5fd3f4073a5d100660e9e79a67ac.tar.gz
Move the runq task start/failed messages to the UI
(Bitbake rev: ab831e867f09b47001cb8da2f8f060e04febf237) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/runqueue.py15
-rw-r--r--bitbake/lib/bb/ui/knotty.py11
2 files changed, 15 insertions, 11 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 6282e5cf9b..7f292290b2 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1259,13 +1259,10 @@ class RunQueueExecuteTasks(RunQueueExecute):
1259 Called when a task has failed 1259 Called when a task has failed
1260 Updates the state engine with the failure 1260 Updates the state engine with the failure
1261 """ 1261 """
1262 logger.error("Task %s (%s) failed with exit code '%s'", task,
1263 self.rqdata.get_user_idstring(task), exitcode)
1264
1265 self.stats.taskFailed() 1262 self.stats.taskFailed()
1266 fnid = self.rqdata.runq_fnid[task] 1263 fnid = self.rqdata.runq_fnid[task]
1267 self.failed_fnids.append(fnid) 1264 self.failed_fnids.append(fnid)
1268 bb.event.fire(runQueueTaskFailed(task, self.stats, self.rq), self.cfgData) 1265 bb.event.fire(runQueueTaskFailed(task, self.stats, exitcode, self.rq), self.cfgData)
1269 if self.rqdata.taskData.abort: 1266 if self.rqdata.taskData.abort:
1270 self.rq.state = runQueueCleanUp 1267 self.rq.state = runQueueCleanUp
1271 1268
@@ -1308,11 +1305,6 @@ class RunQueueExecuteTasks(RunQueueExecute):
1308 self.task_complete(task) 1305 self.task_complete(task)
1309 return True 1306 return True
1310 1307
1311 logger.info("Running task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1,
1312 self.stats.total,
1313 task,
1314 self.rqdata.get_user_idstring(task)))
1315
1316 pid, pipein, pipeout = self.fork_off_task(fn, task, taskname) 1308 pid, pipein, pipeout = self.fork_off_task(fn, task, taskname)
1317 1309
1318 self.build_pids[pid] = task 1310 self.build_pids[pid] = task
@@ -1497,7 +1489,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
1497 def task_fail(self, task, result): 1489 def task_fail(self, task, result):
1498 self.stats.taskFailed() 1490 self.stats.taskFailed()
1499 index = self.rqdata.runq_setscene[task] 1491 index = self.rqdata.runq_setscene[task]
1500 bb.event.fire(runQueueTaskFailed(task, self.stats, self), self.cfgData) 1492 bb.event.fire(runQueueTaskFailed(task, self.stats, result, self), self.cfgData)
1501 self.scenequeue_notcovered.add(task) 1493 self.scenequeue_notcovered.add(task)
1502 self.scenequeue_updatecounters(task) 1494 self.scenequeue_updatecounters(task)
1503 1495
@@ -1626,8 +1618,9 @@ class runQueueTaskFailed(runQueueEvent):
1626 """ 1618 """
1627 Event notifing a task failed 1619 Event notifing a task failed
1628 """ 1620 """
1629 def __init__(self, task, stats, rq): 1621 def __init__(self, task, stats, exitcode, rq):
1630 runQueueEvent.__init__(self, task, stats, rq) 1622 runQueueEvent.__init__(self, task, stats, rq)
1623 self.exitcode = exitcode
1631 self.message = "Task %s failed (%s)" % (task, self.taskstring) 1624 self.message = "Task %s failed (%s)" % (task, self.taskstring)
1632 1625
1633class runQueueTaskCompleted(runQueueEvent): 1626class runQueueTaskCompleted(runQueueEvent):
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index d3534a0f5b..b97c5a1b5e 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -192,6 +192,17 @@ def main(server, eventHandler):
192 logger.error("Nothing %sPROVIDES '%s'", r, event._item) 192 logger.error("Nothing %sPROVIDES '%s'", r, event._item)
193 continue 193 continue
194 194
195 if isinstance(event, bb.runqueue.runQueueTaskStarted):
196 logger.info("Running task %s of %s (ID: %s, %s)",
197 event.stats.completed + event.stats.active + event.stats.failed + 1,
198 event.stats.total, event.taskid, event.taskstring)
199 continue
200
201 if isinstance(event, bb.runqueue.runQueueTaskFailed):
202 logger.error("Task %s (%s) failed with exit code '%s'",
203 event.taskid, event.taskstring, event.exitcode)
204 continue
205
195 # ignore 206 # ignore
196 if isinstance(event, (bb.event.BuildBase, 207 if isinstance(event, (bb.event.BuildBase,
197 bb.event.StampUpdate, 208 bb.event.StampUpdate,