Patchwork [bitbake-devel,15/94] bitbake: dsi: Translate runQueue events into Task data

login
register
mail settings
Submitter Alexandru DAMIAN
Date Sept. 24, 2013, 4:51 p.m.
Message ID <ca57d76c7063953d49aaa92e61221d168c53fad5.1380041477.git.alexandru.damian@intel.com>
Download mbox | patch
Permalink /patch/58827/
State New
Headers show

Comments

Alexandru DAMIAN - Sept. 24, 2013, 4:51 p.m.
From: Alexandru DAMIAN <alexandru.damian@intel.com>

We're moving the capture of task running information from
bb.build.Task* events to runQueue* events.

We handle runQueueTaskSkipped events to record all skipped
tasks.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
---
 bitbake/lib/bb/ui/dsi.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/dsi.py b/bitbake/lib/bb/ui/dsi.py
index 5ff5696..e527e56 100644
--- a/bitbake/lib/bb/ui/dsi.py
+++ b/bitbake/lib/bb/ui/dsi.py
@@ -287,11 +287,8 @@  def main(server, eventHandler, params, tf = TerminalFilter):
             if isinstance(event, bb.event.BuildStarted):
                 buildinfohelper.store_started_build(event)
 
-            if isinstance(event, bb.build.TaskStarted):
-                buildinfohelper.store_started_task(event)
-
             if isinstance(event, (bb.build.TaskSucceeded, bb.build.TaskFailedSilent, bb.build.TaskFailed)):
-                buildinfohelper.update_and_store_task(event)
+                continue
 
             if isinstance(event, bb.event.LogExecTTY):
                 if log_exec_tty:
@@ -416,13 +413,19 @@  def main(server, eventHandler, params, tf = TerminalFilter):
                             event.stats.total, event.taskid, event.taskstring)
                 continue
 
+            if isinstance(event, (bb.runqueue.runQueueTaskCompleted, bb.runqueue.runQueueTaskSkipped)):
+                buildinfohelper.store_started_task(event)
+                continue
+
             if isinstance(event, bb.runqueue.runQueueTaskFailed):
+                buildinfohelper.update_and_store_task(event)
                 taskfailures.append(event.taskstring)
                 logger.error("Task %s (%s) failed with exit code '%s'",
                              event.taskid, event.taskstring, event.exitcode)
                 continue
 
             if isinstance(event, bb.runqueue.sceneQueueTaskFailed):
+                buildinfohelper.update_and_store_task(event)
                 logger.warn("Setscene task %s (%s) failed with exit code '%s' - real task will be run instead",
                              event.taskid, event.taskstring, event.exitcode)
                 continue