Skip to content
This repository has been archived by the owner on Jan 27, 2019. It is now read-only.

Commit

Permalink
oelite/baker.py: add --dryrun option
Browse files Browse the repository at this point in the history
This makes it easier to do all the initial recipe parsing, hash
computation etc. without doing an actual build - this is especially
useful if one is doing some automated testing of a series of meta/core
commits, since one doesn't have to sit and stare at the terminal for a
few minutes waiting to say 'no'. It can also be useful in
non-interactive settings, for example setting up a cheap buildbot job to
do "oe bake world --dryrun" to check that all recipes actually parse,
without doing a full build.
  • Loading branch information
Rasmus Villemoes committed Nov 4, 2016
1 parent f28361d commit 9ab9968
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/oelite/baker.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def add_bake_parser_options(parser):
action="store_true", default=False,
help="assume 'y' response to trivial questions")

parser.add_option("--dryrun",
action="store_true", default=False,
help="do recipe parsing, dependency resolving etc., but do not actually bake anything")

parser.add_option("--rmwork",
action="store_true", default=None,
help="clean workdir for all recipes being built")
Expand Down Expand Up @@ -546,6 +550,10 @@ def bake(self):
text.append("%s:%s(%d)"%(recipe[1], recipe[2], recipe[4]))
print oelite.util.format_textblock(" ".join(text))

if self.options.dryrun:
print "Dryrun, not baking"
return 0

self.cookbook.compute_recipe_build_priorities()

if os.isatty(sys.stdin.fileno()) and not self.options.yes:
Expand Down

0 comments on commit 9ab9968

Please sign in to comment.