runqueue: add option to run all tasks in specific build target
PATCH v2 1/1 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.
--- lib/bb/cookerdata.py | 1 + lib/bb/main.py | 3 +++ lib/bb/runqueue.py | 14 ++++++++++++++ 3 files changed, 18 insertions(+)
lib/bb/cookerdata.py +1 -0
@@ -148,6 +148,7 @@ class CookerConfiguration(object): self.writeeventlog = False self.server_only = False self.limited_deps = False + self.runall = None self.env = {}
lib/bb/main.py +3 -0
@@ -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 all tasks in build target that is specified.") + options, targets = parser.parse_args(argv) if options.quiet and options.verbose:
lib/bb/runqueue.py +14 -0
@@ -803,6 +803,20 @@ 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 + # # Step D - Sanity checks and computation #
Signature · 1 line
2.7.4
Quoted 48 lines · Matthew McClintock
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.Signed-off-by Matthew McClintock <[email protected]>--- lib/bb/cookerdata.py | 1 + lib/bb/main.py | 3 +++ lib/bb/runqueue.py | 14 ++++++++++++++ 3 files changed, 18 insertions(+)lib/bb/cookerdata.py +1
-0@@ -148,6 +148,7 @@ class CookerConfiguration(object): self.writeeventlog = False self.server_only = False self.limited_deps = False + self.runall = None self.env = {}lib/bb/main.py +0
-0@@ -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.")lib/bb/main.py +2
-0+ parser.add_option("", "--runall", action="store", dest="runall", + help="Run all tasks in build target that is
Quoted 2 lines
specified.")
+
This looks good (I’m sick of having to keep adding ‘all’ variants for tasks), but I don’t think this argument help description is very clear.
Signature · 4 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics
On Mar 7, 2017 9:10 PM, "Christopher Larson" <[email protected]> wrote:
Quoted 48 lines · Matthew McClintock
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.Signed-off-by Matthew McClintock <[email protected]>--- lib/bb/cookerdata.py | 1 + lib/bb/main.py | 3 +++ lib/bb/runqueue.py | 14 ++++++++++++++ 3 files changed, 18 insertions(+)lib/bb/cookerdata.py +1
-0@@ -148,6 +148,7 @@ class CookerConfiguration(object): self.writeeventlog = False self.server_only = False self.limited_deps = False + self.runall = None self.env = {}lib/bb/main.py +0
-0@@ -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.")lib/bb/main.py +2
-0+ parser.add_option("", "--runall", action="store", dest="runall", + help="Run all tasks in build target that is
Quoted 2 lines
specified.")
+
This looks good (I’m sick of having to keep adding ‘all’ variants for tasks), but I don’t think this argument help description is very clear.
Ah I was struggling with the verbiage here. Feel free to make a suggestion otherwise I'll try for something better tomorrow.
-M
Signature · 4 lines
Christopher Larson kergoth at gmail dot com Founder - BitBake, OpenEmbedded, OpenZaurus Senior Software Engineer, Mentor Graphics
From: [email protected] [mailto:[email protected]] On Behalf Of Matthew McClintock
Sent: den 8 mars 2017 04:19
To: Chris Larson
Cc: [email protected]
Subject: Re: [bitbake-devel] [PATCH v2] runqueue: add option to run all tasks in specific build target
On Mar 7, 2017 9:10 PM, "Christopher Larson" <[email protected]<mailto:[email protected]>> wrote:
On Tue, Mar 7, 2017 at 7:57 PM, Matthew McClintock <[email protected]<mailto:[email protected]>> wrote:
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.
--- lib/bb/cookerdata.py | 1 + lib/bb/main.py | 3 +++ lib/bb/runqueue.py | 14 ++++++++++++++ 3 files changed, 18 insertions(+)
lib/bb/cookerdata.py +1 -0
@@ -148,6 +148,7 @@ class CookerConfiguration(object): self.writeeventlog = False self.server_only = False self.limited_deps = False + self.runall = None self.env = {}
lib/bb/main.py +3 -0
@@ -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 all tasks in build target that is specified.") +
This looks good (I’m sick of having to keep adding ‘all’ variants for tasks), but I don’t think this argument help description is very clear.
Ah I was struggling with the verbiage here. Feel free to make a suggestion otherwise I'll try for something better tomorrow.
-M
--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
Maybe something like:
Run the specified task for all build targets and their dependencies.
//Peter