From 404f2aef94f8db6e46101e4ec9a6aa7e85b97880 Mon Sep 17 00:00:00 2001 From: Matthew McClintock Date: Wed, 8 Mar 2017 14:24:38 -0600 Subject: bitbake: runqueue: add option to run all tasks in specific build target For example: $ bitbake core-image-minimal --runall unpack ... NOTE: Tasks Summary: Attempted 326 tasks of which 88 didn't need to be rerun and all succeeded. $ bitbake core-image-minimal --runall patch NOTE: Tasks Summary: Attempted 453 tasks of which 332 didn't need to be rerun and all succeeded. This can replace fetchall as well: $ bitbake core-image-minimal --runall fetch NOTE: Tasks Summary: Attempted 135 tasks of which 119 didn't need to be rerun and all succeeded. (Bitbake rev: 7c0fa6ba66cdb956b37d94055307cde857633df9) Signed-off-by: Matthew McClintock Signed-off-by: Richard Purdie --- bitbake/lib/bb/runqueue.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bitbake/lib/bb/runqueue.py') diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index a3b451ad6f..38304d16d3 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -803,6 +803,23 @@ class RunQueueData: self.init_progress_reporter.next_stage() + if self.cooker.configuration.runall is not None: + runall = "do_%s" % self.cooker.configuration.runall + runall_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == runall } + + # re-run the mark_active and then drop unused tasks from new list + runq_build = {} + for tid in list(runall_tids): + mark_active(tid,1) + + for tid in list(self.runtaskentries.keys()): + if tid not in runq_build: + del self.runtaskentries[tid] + delcount += 1 + + if len(self.runtaskentries) == 0: + bb.msg.fatal("RunQueue", "No remaining tasks to run run for build target %s with runall %s" % (target, runall)) + # # Step D - Sanity checks and computation # -- cgit v1.2.3-54-g00ecf