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>
This commit is contained in:
parent
f7621f47d8
commit
5ee82d4048
|
@ -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())
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue