summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-06 14:58:55 -0700
committerChris Larson <chris_larson@mentor.com>2010-12-13 12:34:37 -0700
commitab831e867f09b47001cb8da2f8f060e04febf237 (patch)
tree078ba993a345e154b244c8a06efd4402884945d3 /lib
parent9e7d7f7e5381c45fe54680e9e4000de54b3cb9ed (diff)
downloadbitbake-ab831e867f09b47001cb8da2f8f060e04febf237.tar.gz
Move the runq task start/failed messages to the UI
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/runqueue.py12
-rw-r--r--lib/bb/ui/knotty.py11
2 files changed, 14 insertions, 9 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 635a7b145..bce4b1b2a 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -977,13 +977,8 @@ class RunQueueExecute:
self.rq.state = runQueueComplete
return
-
def notify_task_started(self, task):
bb.event.fire(runQueueTaskStarted(task, self.stats, self.rq), self.cfgData)
- logger.info("Running task %d of %d (ID: %s, %s)", self.stats.completed + self.stats.active + self.stats.failed + 1,
- self.stats.total,
- task,
- self.rqdata.get_user_idstring(task))
def notify_task_completed(self, task):
bb.event.fire(runQueueTaskCompleted(task, self.stats, self.rq), self.cfgData)
@@ -1103,12 +1098,10 @@ class RunQueueExecuteTasks(RunQueueExecute):
Called when a task has failed
Updates the state engine with the failure
"""
- logger.error("Task %s (%s) failed with exit code '%s'", task,
- self.rqdata.get_user_idstring(task), exitcode)
self.stats.taskFailed()
fnid = self.rqdata.runq_fnid[task]
self.failed_fnids.append(fnid)
- bb.event.fire(runQueueTaskFailed(task, self.stats, self.rq), self.cfgData)
+ bb.event.fire(runQueueTaskFailed(task, self.stats, exitcode, self.rq), self.cfgData)
if self.rqdata.taskData.abort:
self.rq.state = runQueueCleanUp
@@ -1219,8 +1212,9 @@ class runQueueTaskFailed(runQueueEvent):
"""
Event notifing a task failed
"""
- def __init__(self, task, stats, rq):
+ def __init__(self, task, stats, exitcode, rq):
runQueueEvent.__init__(self, task, stats, rq)
+ self.exitcode = exitcode
self.message = "Task %s failed (%s)" % (task, self.taskstring)
class runQueueTaskCompleted(runQueueEvent):
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 8a7b2b760..8a077df2e 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -189,6 +189,17 @@ def main(server, eventHandler):
logger.error("Nothing %sPROVIDES '%s'", r, event._item)
continue
+ if isinstance(event, bb.runqueue.runQueueTaskStarted):
+ logger.info("Running task %s of %s (ID: %s, %s)",
+ event.stats.completed + event.stats.active + event.stats.failed + 1,
+ event.stats.total, event.taskid, event.taskstring)
+ continue
+
+ if isinstance(event, bb.runqueue.runQueueTaskFailed):
+ logger.error("Task %s (%s) failed with exit code '%s'",
+ event.taskid, event.taskstring, event.exitcode)
+ continue
+
# ignore
if isinstance(event, (bb.event.BuildBase,
bb.event.StampUpdate,