[bitbake-devel] [PATCH 29/94] bitbake: dsi: fix the reading of task event information

Alex DAMIAN alexandru.damian at intel.com
Tue Sep 24 16:51:58 UTC 2013


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

Fixing a problem where the event outcome wasn't processed.
Moving all the event-type-dependent code at the same level
in the class.

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index d489c87..6eafea0 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -231,14 +231,6 @@ class BuildInfoHelper(object):
         task_information = {}
         task_information['build'] = self.internal_state['build']
         task_information['outcome'] = Task.OUTCOME_NA
-        if isinstance(event, bb.runqueue.runQueueTaskSkipped):
-            task_information['task_executed'] = False
-            if event._skip == "covered":
-                task_information['outcome'] = Task.OUTCOME_COVERED
-            if event._skip == "existing":
-                task_information['outcome'] = Task.OUTCOME_EXISTING
-        else:
-            task_information['task_executed'] = True
         task_information['recipe'] = recipe
         task_information['task_name'] = event.taskname
         return task_information
@@ -360,10 +352,19 @@ class BuildInfoHelper(object):
         recipe = self.orm_wrapper.get_update_recipe_object(recipe_information)
 
         task_information = self._get_task_information(event, recipe)
+        task_information['outcome'] = Task.OUTCOME_NA
+
+        if isinstance(event, bb.runqueue.runQueueTaskSkipped):
+            task_information['task_executed'] = False
+            if event.reason == "covered":
+                task_information['outcome'] = Task.OUTCOME_COVERED
+            if event.reason == "existing":
+                task_information['outcome'] = Task.OUTCOME_EXISTING
+        else:
+            task_information['task_executed'] = True
 
         self.task_order += 1
         task_information['order'] = self.task_order
-        task_information['outcome'] = Task.OUTCOME_NA
         task_obj = self.orm_wrapper.get_update_task_object(task_information)
 
         self.internal_state[identifier] = {'start_time': datetime.datetime.now()}
@@ -385,6 +386,10 @@ class BuildInfoHelper(object):
             task_information['disk_io'] = task_build_stats['disk_io']
             del self.internal_state[identifier]
 
+        if isinstance(event, bb.runqueue.runQueueTaskFailed):
+            task_information['outcome'] = Task.OUTCOME_FAILED
+            del self.internal_state[identifier]
+
         #TODO: get error number
         #TODO: get warnings number
         #TODO: get warning information
-- 
1.8.1.2




More information about the bitbake-devel mailing list