]> code.ossystems Code Review - openembedded-core.git/commitdiff
Move the runq task start/failed messages to the UI
authorChris Larson <chris_larson@mentor.com>
Mon, 6 Dec 2010 21:58:55 +0000 (14:58 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:49 +0000 (14:46 +0000)
(Bitbake rev: ab831e867f09b47001cb8da2f8f060e04febf237)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/runqueue.py
bitbake/lib/bb/ui/knotty.py

index 6282e5cf9b722b6ce141b7c100133f76983956ad..7f292290b222315accf1a00edb6551ea9ad2be3a 100644 (file)
@@ -1259,13 +1259,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
 
@@ -1308,11 +1305,6 @@ class RunQueueExecuteTasks(RunQueueExecute):
                 self.task_complete(task)
                 return True
 
-            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)))
-
             pid, pipein, pipeout = self.fork_off_task(fn, task, taskname)
 
             self.build_pids[pid] = task
@@ -1497,7 +1489,7 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
     def task_fail(self, task, result):
         self.stats.taskFailed()
         index = self.rqdata.runq_setscene[task]
-        bb.event.fire(runQueueTaskFailed(task, self.stats, self), self.cfgData)
+        bb.event.fire(runQueueTaskFailed(task, self.stats, result, self), self.cfgData)
         self.scenequeue_notcovered.add(task)
         self.scenequeue_updatecounters(task)
 
@@ -1626,8 +1618,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):
index d3534a0f5b83233ba1fba4acc0ee0e7f7a03f1c9..b97c5a1b5e2db2707ecd7fba15e2fa5aa5a0b6a2 100644 (file)
@@ -192,6 +192,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,