diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-01 14:36:38 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:49 +0000 |
commit | 2b7c2a842092fcec1389bc234bec2ef8c3c5973a (patch) | |
tree | 9c4db1f0be4f189376a95ea14616ab530cf5b68c /bitbake | |
parent | fcba92f3548b5fd3f4073a5d100660e9e79a67ac (diff) | |
download | poky-2b7c2a842092fcec1389bc234bec2ef8c3c5973a.tar.gz |
bitbake: Transfer noexec runqueue messages to the UI
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 17 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 11 |
2 files changed, 16 insertions, 12 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 7f292290b2..d4cea7d5d4 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1295,15 +1295,16 @@ class RunQueueExecuteTasks(RunQueueExecute): | |||
1295 | 1295 | ||
1296 | taskdep = self.rqdata.dataCache.task_deps[fn] | 1296 | taskdep = self.rqdata.dataCache.task_deps[fn] |
1297 | if 'noexec' in taskdep and taskname in taskdep['noexec']: | 1297 | if 'noexec' in taskdep and taskname in taskdep['noexec']: |
1298 | logger.info("Noexec task %d of %d (ID: %s, %s)" % (self.stats.completed + self.stats.active + self.stats.failed + 1, | 1298 | startevent = runQueueTaskStarted(task, self.stats, self.rq, noexec=True) |
1299 | self.stats.total, | 1299 | bb.event.fire(startevent, self.cfgData) |
1300 | task, | ||
1301 | self.rqdata.get_user_idstring(task))) | ||
1302 | self.runq_running[task] = 1 | 1300 | self.runq_running[task] = 1 |
1303 | self.stats.taskActive() | 1301 | self.stats.taskActive() |
1304 | bb.build.make_stamp(taskname, self.rqdata.dataCache, fn) | 1302 | bb.build.make_stamp(taskname, self.rqdata.dataCache, fn) |
1305 | self.task_complete(task) | 1303 | self.task_complete(task) |
1306 | return True | 1304 | return True |
1305 | else: | ||
1306 | startevent = runQueueTaskStarted(task, self.stats, self.rq) | ||
1307 | bb.event.fire(startevent, self.cfgData) | ||
1307 | 1308 | ||
1308 | pid, pipein, pipeout = self.fork_off_task(fn, task, taskname) | 1309 | pid, pipein, pipeout = self.fork_off_task(fn, task, taskname) |
1309 | 1310 | ||
@@ -1610,9 +1611,9 @@ class runQueueTaskStarted(runQueueEvent): | |||
1610 | """ | 1611 | """ |
1611 | Event notifing a task was started | 1612 | Event notifing a task was started |
1612 | """ | 1613 | """ |
1613 | def __init__(self, task, stats, rq): | 1614 | def __init__(self, task, stats, rq, noexec=False): |
1614 | runQueueEvent.__init__(self, task, stats, rq) | 1615 | runQueueEvent.__init__(self, task, stats, rq) |
1615 | self.message = "Running task %s (%d of %d) (%s)" % (task, stats.completed + stats.active + 1, self.stats.total, self.taskstring) | 1616 | self.noexec = noexec |
1616 | 1617 | ||
1617 | class runQueueTaskFailed(runQueueEvent): | 1618 | class runQueueTaskFailed(runQueueEvent): |
1618 | """ | 1619 | """ |
@@ -1621,15 +1622,11 @@ class runQueueTaskFailed(runQueueEvent): | |||
1621 | def __init__(self, task, stats, exitcode, rq): | 1622 | def __init__(self, task, stats, exitcode, rq): |
1622 | runQueueEvent.__init__(self, task, stats, rq) | 1623 | runQueueEvent.__init__(self, task, stats, rq) |
1623 | self.exitcode = exitcode | 1624 | self.exitcode = exitcode |
1624 | self.message = "Task %s failed (%s)" % (task, self.taskstring) | ||
1625 | 1625 | ||
1626 | class runQueueTaskCompleted(runQueueEvent): | 1626 | class runQueueTaskCompleted(runQueueEvent): |
1627 | """ | 1627 | """ |
1628 | Event notifing a task completed | 1628 | Event notifing a task completed |
1629 | """ | 1629 | """ |
1630 | def __init__(self, task, stats, rq): | ||
1631 | runQueueEvent.__init__(self, task, stats, rq) | ||
1632 | self.message = "Task %s completed (%s)" % (task, self.taskstring) | ||
1633 | 1630 | ||
1634 | #def check_stamp_fn(fn, taskname, d): | 1631 | #def check_stamp_fn(fn, taskname, d): |
1635 | # rq = bb.data.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", d) | 1632 | # rq = bb.data.getVar("__RUNQUEUE_DO_NOT_USE_EXTERNALLY", d) |
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index b97c5a1b5e..9f3ec41b5c 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -193,9 +193,16 @@ def main(server, eventHandler): | |||
193 | continue | 193 | continue |
194 | 194 | ||
195 | if isinstance(event, bb.runqueue.runQueueTaskStarted): | 195 | if isinstance(event, bb.runqueue.runQueueTaskStarted): |
196 | logger.info("Running task %s of %s (ID: %s, %s)", | 196 | if event.noexec: |
197 | event.stats.completed + event.stats.active + event.stats.failed + 1, | 197 | tasktype = 'noexec task' |
198 | else: | ||
199 | tasktype = 'task' | ||
200 | logger.info("Running %s %s of %s (ID: %s, %s)", | ||
201 | tasktype, | ||
202 | event.stats.completed + event.stats.active + | ||
203 | event.stats.failed + 1, | ||
198 | event.stats.total, event.taskid, event.taskstring) | 204 | event.stats.total, event.taskid, event.taskstring) |
205 | |||
199 | continue | 206 | continue |
200 | 207 | ||
201 | if isinstance(event, bb.runqueue.runQueueTaskFailed): | 208 | if isinstance(event, bb.runqueue.runQueueTaskFailed): |