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>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck
index 4def309..feb3252 100755
--- a/scripts/sanitycheck
+++ b/scripts/sanitycheck
@@ -1364,8 +1364,9 @@
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 @@
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)