summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/cookerdata.py1
-rwxr-xr-xbitbake/lib/bb/main.py3
-rw-r--r--bitbake/lib/bb/runqueue.py17
3 files changed, 21 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 53f458786f..722d860246 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -148,6 +148,7 @@ class CookerConfiguration(object):
self.writeeventlog = False
self.server_only = False
self.limited_deps = False
+ self.runall = None
self.env = {}
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 3ff43cf9ae..b3cd2cfe20 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -287,6 +287,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
help="Writes the event log of the build to a bitbake event json file. "
"Use '' (empty string) to assign the name automatically.")
+ parser.add_option("", "--runall", action="store", dest="runall",
+ help="Run the specified task for all build targets and their dependencies.")
+
options, targets = parser.parse_args(argv)
if options.quiet and options.verbose:
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
#