sanitycheck: default to cleaning outdir

-C/--clean is now -n/--no-clean. Made this change since the build system
can't always do incremental rebuild correctly depending on what was
changed (such as Make variables).

Change-Id: I199e505693479184b2f197ddb584ade5eca1704a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2015-07-31 12:26:12 -07:00 committed by Anas Nashif
commit ae9e7f7bca

View file

@ -1364,8 +1364,9 @@ def parse_arguments():
parser.add_argument("-O", "--outdir",
default="%s/sanity-out" % ZEPHYR_BASE,
help="Output directory for logs and binaries.")
parser.add_argument("-C", "--clean", action="store_true",
help="Delete the outdir before building")
parser.add_argument("-n", "--no-clean", action="store_true",
help="Do not delete the outdir before building. Will result in "
"faster compilation since builds will be incremental")
parser.add_argument("-T", "--testcase-root",
default="%s/samples" % ZEPHYR_BASE,
help="Base directory to recursively search for test cases. All "
@ -1439,7 +1440,7 @@ def main():
if args.all:
args.platform = ["all"]
if os.path.exists(args.outdir) and args.clean:
if os.path.exists(args.outdir) and not args.no_clean:
info("Cleaning output directory " + args.outdir)
shutil.rmtree(args.outdir)