[bitbake-devel] [PATCH 53/94] bitbake: dsi: fix sstate task information gathering

Alex DAMIAN alexandru.damian at intel.com
Tue Sep 24 16:52:22 UTC 2013


From: Alexandru DAMIAN <alexandru.damian at intel.com>

Fixing the information gathering for sstate-related tasks -
now the start and completion events are correctly handled,
and we get an update for tasks that were covered by sstate
tasks.

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 6 +++++-
 bitbake/lib/bb/ui/dsi.py             | 5 ++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 1d8cb44..bfd7fef 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -67,7 +67,11 @@ class ORMWrapper(object):
         for v in vars(task_object):
             if v in task_information.keys():
                 vars(task_object)[v] = task_information[v]
+        # if we got covered by a setscene task, we're SSTATE
+        if task_object.outcome == Task.OUTCOME_COVERED and 1 == Task.objects.filter(task_executed=True, build = task_object.build, recipe = task_object.recipe, task_name=task_object.task_name+"_setscene").count():
+            task_object.outcome = Task.OUTCOME_SSTATE
 
+        # mark down duration if we have a start time
         if 'start_time' in task_information.keys():
             duration = datetime.datetime.now() - task_information['start_time']
             task_object.elapsed_time = duration.total_seconds()
@@ -393,7 +397,7 @@ class BuildInfoHelper(object):
         except:
             pass
 
-        if isinstance(event, bb.runqueue.runQueueTaskCompleted):
+        if isinstance(event, (bb.runqueue.runQueueTaskCompleted, bb.runqueue.sceneQueueTaskCompleted)):
             task_information['outcome'] = Task.OUTCOME_SUCCESS     # TODO: needs to use constants
             task_build_stats = self._get_task_build_stats(self.orm_wrapper.get_update_task_object(task_information))
             task_information['cpu_usage'] = task_build_stats['cpu_usage']
diff --git a/bitbake/lib/bb/ui/dsi.py b/bitbake/lib/bb/ui/dsi.py
index 3e0b7ff..0305121 100644
--- a/bitbake/lib/bb/ui/dsi.py
+++ b/bitbake/lib/bb/ui/dsi.py
@@ -415,6 +415,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
                 continue
 
             if isinstance(event, bb.runqueue.sceneQueueTaskStarted):
+                buildinfohelper.store_started_task(event)
                 logger.info("Running setscene task %d of %d (%s)" % (event.stats.completed + event.stats.active + event.stats.failed + 1, event.stats.total, event.taskstring))
                 continue
 
@@ -446,10 +447,8 @@ def main(server, eventHandler, params, tf = TerminalFilter):
                              event.taskid, event.taskstring, event.exitcode)
                 continue
 
-            if isinstance(event, bb.runqueue.sceneQueueTaskFailed):
+            if isinstance(event, (bb.runqueue.sceneQueueTaskCompleted, 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
 
 
-- 
1.8.1.2




More information about the bitbake-devel mailing list