diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cookerdata.py | 1 | ||||
-rwxr-xr-x | bitbake/lib/bb/main.py | 3 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 17 |
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): | |||
148 | self.writeeventlog = False | 148 | self.writeeventlog = False |
149 | self.server_only = False | 149 | self.server_only = False |
150 | self.limited_deps = False | 150 | self.limited_deps = False |
151 | self.runall = None | ||
151 | 152 | ||
152 | self.env = {} | 153 | self.env = {} |
153 | 154 | ||
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): | |||
287 | help="Writes the event log of the build to a bitbake event json file. " | 287 | help="Writes the event log of the build to a bitbake event json file. " |
288 | "Use '' (empty string) to assign the name automatically.") | 288 | "Use '' (empty string) to assign the name automatically.") |
289 | 289 | ||
290 | parser.add_option("", "--runall", action="store", dest="runall", | ||
291 | help="Run the specified task for all build targets and their dependencies.") | ||
292 | |||
290 | options, targets = parser.parse_args(argv) | 293 | options, targets = parser.parse_args(argv) |
291 | 294 | ||
292 | if options.quiet and options.verbose: | 295 | 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: | |||
803 | 803 | ||
804 | self.init_progress_reporter.next_stage() | 804 | self.init_progress_reporter.next_stage() |
805 | 805 | ||
806 | if self.cooker.configuration.runall is not None: | ||
807 | runall = "do_%s" % self.cooker.configuration.runall | ||
808 | runall_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == runall } | ||
809 | |||
810 | # re-run the mark_active and then drop unused tasks from new list | ||
811 | runq_build = {} | ||
812 | for tid in list(runall_tids): | ||
813 | mark_active(tid,1) | ||
814 | |||
815 | for tid in list(self.runtaskentries.keys()): | ||
816 | if tid not in runq_build: | ||
817 | del self.runtaskentries[tid] | ||
818 | delcount += 1 | ||
819 | |||
820 | if len(self.runtaskentries) == 0: | ||
821 | bb.msg.fatal("RunQueue", "No remaining tasks to run run for build target %s with runall %s" % (target, runall)) | ||
822 | |||
806 | # | 823 | # |
807 | # Step D - Sanity checks and computation | 824 | # Step D - Sanity checks and computation |
808 | # | 825 | # |