summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2013-09-18 13:15:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-18 15:14:13 +0100
commitb4a5e4be50d871a80dbe0993117d73f5ad82e38f (patch)
treeab2c5ac3b239a980907397dc78f7e469042d4c8a
parent75466a53b6eece5173a9bfe483414148e4c06517 (diff)
downloadbitbake-b4a5e4be50d871a80dbe0993117d73f5ad82e38f.tar.gz
bitbake: build, runqueue: adds info to the *runQueue* events
This patch adds task identifying information for all runQueue and sceneQueue events, and for bb.build.Task* events. This will allow matching event to specific tasks in the UI handlers processing these events. Adds RunQueueData functions to get the task name and task file for usage with the runQueue* events. Adds taskfile and taskname properties to bb.build.TaskBase. Adds taskfile and taskname properties to the *runQueue* events Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/build.py2
-rw-r--r--lib/bb/runqueue.py10
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 7ee500773..8aec699e7 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -72,6 +72,8 @@ class TaskBase(event.Event):
def __init__(self, t, logfile, d):
self._task = t
self._package = d.getVar("PF", True)
+ self.taskfile = d.getVar("FILE", True)
+ self.taskname = self._task
self.logfile = logfile
event.Event.__init__(self)
self._message = "recipe %s: task %s: %s" % (d.getVar("PF", True), t, self.getDisplayName())
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 472509fa1..19e89e969 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -217,6 +217,12 @@ class RunQueueData:
ret.extend([nam])
return ret
+ def get_task_name(self, task):
+ return self.runq_task[task]
+
+ def get_task_file(self, task):
+ return self.taskData.fn_index[self.runq_fnid[task]]
+
def get_user_idstring(self, task, task_name_suffix = ""):
fn = self.taskData.fn_index[self.runq_fnid[task]]
taskname = self.runq_task[task] + task_name_suffix
@@ -1786,6 +1792,8 @@ class runQueueEvent(bb.event.Event):
def __init__(self, task, stats, rq):
self.taskid = task
self.taskstring = rq.rqdata.get_user_idstring(task)
+ self.taskname = rq.rqdata.get_task_name(task)
+ self.taskfile = rq.rqdata.get_task_file(task)
self.stats = stats.copy()
bb.event.Event.__init__(self)
@@ -1797,6 +1805,8 @@ class sceneQueueEvent(runQueueEvent):
runQueueEvent.__init__(self, task, stats, rq)
realtask = rq.rqdata.runq_setscene[task]
self.taskstring = rq.rqdata.get_user_idstring(realtask, "_setscene")
+ self.taskname = rq.rqdata.get_task_name(realtask) + "_setscene"
+ self.taskfile = rq.rqdata.get_task_file(realtask)
class runQueueTaskStarted(runQueueEvent):
"""