diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-09-18 13:15:49 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-22 12:19:44 +0100 |
commit | 5ee82d404897c6af8d7cdfc728c6ba007bfd76b7 (patch) | |
tree | 9d5c28759e88a8d98f36f8cb28c59dd42e31ea5b | |
parent | f7621f47d8dc765a921587172e15ec6a3c88f56a (diff) | |
download | poky-5ee82d404897c6af8d7cdfc728c6ba007bfd76b7.tar.gz |
bitbake: 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
(Bitbake rev: b4a5e4be50d871a80dbe0993117d73f5ad82e38f)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/build.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 7ee500773d..8aec699e79 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -72,6 +72,8 @@ class TaskBase(event.Event): | |||
72 | def __init__(self, t, logfile, d): | 72 | def __init__(self, t, logfile, d): |
73 | self._task = t | 73 | self._task = t |
74 | self._package = d.getVar("PF", True) | 74 | self._package = d.getVar("PF", True) |
75 | self.taskfile = d.getVar("FILE", True) | ||
76 | self.taskname = self._task | ||
75 | self.logfile = logfile | 77 | self.logfile = logfile |
76 | event.Event.__init__(self) | 78 | event.Event.__init__(self) |
77 | self._message = "recipe %s: task %s: %s" % (d.getVar("PF", True), t, self.getDisplayName()) | 79 | self._message = "recipe %s: task %s: %s" % (d.getVar("PF", True), t, self.getDisplayName()) |
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 472509fa10..19e89e9692 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -217,6 +217,12 @@ class RunQueueData: | |||
217 | ret.extend([nam]) | 217 | ret.extend([nam]) |
218 | return ret | 218 | return ret |
219 | 219 | ||
220 | def get_task_name(self, task): | ||
221 | return self.runq_task[task] | ||
222 | |||
223 | def get_task_file(self, task): | ||
224 | return self.taskData.fn_index[self.runq_fnid[task]] | ||
225 | |||
220 | def get_user_idstring(self, task, task_name_suffix = ""): | 226 | def get_user_idstring(self, task, task_name_suffix = ""): |
221 | fn = self.taskData.fn_index[self.runq_fnid[task]] | 227 | fn = self.taskData.fn_index[self.runq_fnid[task]] |
222 | taskname = self.runq_task[task] + task_name_suffix | 228 | taskname = self.runq_task[task] + task_name_suffix |
@@ -1786,6 +1792,8 @@ class runQueueEvent(bb.event.Event): | |||
1786 | def __init__(self, task, stats, rq): | 1792 | def __init__(self, task, stats, rq): |
1787 | self.taskid = task | 1793 | self.taskid = task |
1788 | self.taskstring = rq.rqdata.get_user_idstring(task) | 1794 | self.taskstring = rq.rqdata.get_user_idstring(task) |
1795 | self.taskname = rq.rqdata.get_task_name(task) | ||
1796 | self.taskfile = rq.rqdata.get_task_file(task) | ||
1789 | self.stats = stats.copy() | 1797 | self.stats = stats.copy() |
1790 | bb.event.Event.__init__(self) | 1798 | bb.event.Event.__init__(self) |
1791 | 1799 | ||
@@ -1797,6 +1805,8 @@ class sceneQueueEvent(runQueueEvent): | |||
1797 | runQueueEvent.__init__(self, task, stats, rq) | 1805 | runQueueEvent.__init__(self, task, stats, rq) |
1798 | realtask = rq.rqdata.runq_setscene[task] | 1806 | realtask = rq.rqdata.runq_setscene[task] |
1799 | self.taskstring = rq.rqdata.get_user_idstring(realtask, "_setscene") | 1807 | self.taskstring = rq.rqdata.get_user_idstring(realtask, "_setscene") |
1808 | self.taskname = rq.rqdata.get_task_name(realtask) + "_setscene" | ||
1809 | self.taskfile = rq.rqdata.get_task_file(realtask) | ||
1800 | 1810 | ||
1801 | class runQueueTaskStarted(runQueueEvent): | 1811 | class runQueueTaskStarted(runQueueEvent): |
1802 | """ | 1812 | """ |