mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
bitbake: Transfer noexec runqueue messages to the UI
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
@@ -1295,15 +1295,16 @@ class RunQueueExecuteTasks(RunQueueExecute):
|
|||||||
|
|
||||||
taskdep = self.rqdata.dataCache.task_deps[fn]
|
taskdep = self.rqdata.dataCache.task_deps[fn]
|
||||||
if 'noexec' in taskdep and taskname in taskdep['noexec']:
|
if 'noexec' in taskdep and taskname in taskdep['noexec']:
|
||||||
logger.info("Noexec task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1,
|
startevent = runQueueTaskStarted(task, self.stats, self.rq, noexec=True)
|
||||||
self.stats.total,
|
bb.event.fire(startevent, self.cfgData)
|
||||||
task,
|
|
||||||
self.rqdata.get_user_idstring(task)))
|
|
||||||
self.runq_running[task] = 1
|
self.runq_running[task] = 1
|
||||||
self.stats.taskActive()
|
self.stats.taskActive()
|
||||||
bb.build.make_stamp(taskname, self.rqdata.dataCache, fn)
|
bb.build.make_stamp(taskname, self.rqdata.dataCache, fn)
|
||||||
self.task_complete(task)
|
self.task_complete(task)
|
||||||
return True
|
return True
|
||||||
|
else:
|
||||||
|
startevent = runQueueTaskStarted(task, self.stats, self.rq)
|
||||||
|
bb.event.fire(startevent, self.cfgData)
|
||||||
|
|
||||||
pid, pipein, pipeout = self.fork_off_task(fn, task, taskname)
|
pid, pipein, pipeout = self.fork_off_task(fn, task, taskname)
|
||||||
|
|
||||||
@@ -1610,9 +1611,9 @@ class runQueueTaskStarted(runQueueEvent):
|
|||||||
"""
|
"""
|
||||||
Event notifing a task was started
|
Event notifing a task was started
|
||||||
"""
|
"""
|
||||||
def __init__(self, task, stats, rq):
|
def __init__(self, task, stats, rq, noexec=False):
|
||||||
runQueueEvent.__init__(self, task, stats, rq)
|
runQueueEvent.__init__(self, task, stats, rq)
|
||||||
self.message = "Running task %s (%d of %d) (%s)" % (task, stats.completed + stats.active + 1, self.stats.total, self.taskstring)
|
self.noexec = noexec
|
||||||
|
|
||||||
class runQueueTaskFailed(runQueueEvent):
|
class runQueueTaskFailed(runQueueEvent):
|
||||||
"""
|
"""
|
||||||
@@ -1621,15 +1622,11 @@ class runQueueTaskFailed(runQueueEvent):
|
|||||||
def __init__(self, task, stats, exitcode, rq):
|
def __init__(self, task, stats, exitcode, rq):
|
||||||
runQueueEvent.__init__(self, task, stats, rq)
|
runQueueEvent.__init__(self, task, stats, rq)
|
||||||
self.exitcode = exitcode
|
self.exitcode = exitcode
|
||||||
self.message = "Task %s failed (%s)" % (task, self.taskstring)
|
|
||||||
|
|
||||||
class runQueueTaskCompleted(runQueueEvent):
|
class runQueueTaskCompleted(runQueueEvent):
|
||||||
"""
|
"""
|
||||||
Event notifing a task completed
|
Event notifing a task completed
|
||||||
"""
|
"""
|
||||||
def __init__(self, task, stats, rq):
|
|
||||||
runQueueEvent.__init__(self, task, stats, rq)
|
|
||||||
self.message = "Task %s completed (%s)" % (task, self.taskstring)
|
|
||||||
|
|
||||||
#def check_stamp_fn(fn, taskname, d):
|
#def check_stamp_fn(fn, taskname, d):
|
||||||
# rq = bb.data.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", d)
|
# rq = bb.data.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", d)
|
||||||
|
|||||||
@@ -193,9 +193,16 @@ def main(server, eventHandler):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if isinstance(event, bb.runqueue.runQueueTaskStarted):
|
if isinstance(event, bb.runqueue.runQueueTaskStarted):
|
||||||
logger.info("Running task %s of %s (ID: %s, %s)",
|
if event.noexec:
|
||||||
event.stats.completed + event.stats.active + event.stats.failed + 1,
|
tasktype = 'noexec task'
|
||||||
|
else:
|
||||||
|
tasktype = 'task'
|
||||||
|
logger.info("Running %s %s of %s (ID: %s, %s)",
|
||||||
|
tasktype,
|
||||||
|
event.stats.completed + event.stats.active +
|
||||||
|
event.stats.failed + 1,
|
||||||
event.stats.total, event.taskid, event.taskstring)
|
event.stats.total, event.taskid, event.taskstring)
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if isinstance(event, bb.runqueue.runQueueTaskFailed):
|
if isinstance(event, bb.runqueue.runQueueTaskFailed):
|
||||||
|
|||||||
Reference in New Issue
Block a user