'make quickcheck': don't overwrite debug output.

Achieved by turning optdebug into a first-class compilation mode.

R=bmeurer@chromium.org, machenbach@chromium.org

Review URL: https://codereview.chromium.org/98963002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9148975b
...@@ -220,7 +220,8 @@ endif ...@@ -220,7 +220,8 @@ endif
# variables, don't override them (use the targets instead). # variables, don't override them (use the targets instead).
ARCHES = ia32 x64 arm mipsel ARCHES = ia32 x64 arm mipsel
DEFAULT_ARCHES = ia32 x64 arm DEFAULT_ARCHES = ia32 x64 arm
MODES = release debug MODES = release debug optdebug
DEFAULT_MODES = release debug
ANDROID_ARCHES = android_ia32 android_arm android_mipsel ANDROID_ARCHES = android_ia32 android_arm android_mipsel
NACL_ARCHES = nacl_ia32 nacl_x64 NACL_ARCHES = nacl_ia32 nacl_x64
...@@ -247,6 +248,7 @@ NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) ...@@ -247,6 +248,7 @@ NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS))
ENVFILE = $(OUTDIR)/environment ENVFILE = $(OUTDIR)/environment
.PHONY: all check clean dependencies $(ENVFILE).new native \ .PHONY: all check clean dependencies $(ENVFILE).new native \
qc quickcheck \
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
$(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
...@@ -255,7 +257,7 @@ ENVFILE = $(OUTDIR)/environment ...@@ -255,7 +257,7 @@ ENVFILE = $(OUTDIR)/environment
must-set-NACL_SDK_ROOT must-set-NACL_SDK_ROOT
# Target definitions. "all" is the default. # Target definitions. "all" is the default.
all: $(MODES) all: $(DEFAULT_MODES)
# Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
# having been created before. # having been created before.
...@@ -274,11 +276,12 @@ $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) ...@@ -274,11 +276,12 @@ $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
$(ARCHES): $(addprefix $$@.,$(MODES)) $(ARCHES): $(addprefix $$@.,$(MODES))
# Defines how to build a particular target (e.g. ia32.release). # Defines how to build a particular target (e.g. ia32.release).
$(BUILDS): $(OUTDIR)/Makefile.$$(basename $$@) $(BUILDS): $(OUTDIR)/Makefile.$$@
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \ @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \
CXX="$(CXX)" LINK="$(LINK)" \ CXX="$(CXX)" LINK="$(LINK)" \
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
python -c "print raw_input().capitalize()") \ python -c "print \
raw_input().replace('opt', '').capitalize()") \
builddir="$(shell pwd)/$(OUTDIR)/$@" builddir="$(shell pwd)/$(OUTDIR)/$@"
native: $(OUTDIR)/Makefile.native native: $(OUTDIR)/Makefile.native
...@@ -350,39 +353,40 @@ native.check: native ...@@ -350,39 +353,40 @@ native.check: native
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \ @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
--arch-and-mode=. $(TESTFLAGS) --arch-and-mode=. $(TESTFLAGS)
FASTTESTFLAGS = --flaky-tests=skip --slow-tests=skip --pass-fail-tests=skip \ FASTTESTMODES = ia32.release,x64.release,ia32.optdebug,x64.optdebug,arm.optdebug
--variants=default,stress
FASTTESTMODES = ia32.release,x64.release,ia32.debug,x64.debug,arm.debug
quickcheck: COMMA = ,
@$(MAKE) all optdebug=on EMPTY =
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ SPACE = $(EMPTY) $(EMPTY)
--arch-and-mode=$(FASTTESTMODES) $(FASTTESTFLAGS) $(TESTFLAGS) quickcheck: $(subst $(COMMA),$(SPACE),$(FASTTESTMODES))
tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck
qc: quickcheck qc: quickcheck
# Clean targets. You can clean each architecture individually, or everything. # Clean targets. You can clean each architecture individually, or everything.
$(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)): $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)):
rm -f $(OUTDIR)/Makefile.$(basename $@) rm -f $(OUTDIR)/Makefile.$(basename $@)*
rm -rf $(OUTDIR)/$(basename $@).release rm -rf $(OUTDIR)/$(basename $@).release
rm -rf $(OUTDIR)/$(basename $@).debug rm -rf $(OUTDIR)/$(basename $@).debug
find $(OUTDIR) -regex '.*\(host\|target\).$(basename $@)\.mk' -delete find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete
native.clean: native.clean:
rm -f $(OUTDIR)/Makefile.native rm -f $(OUTDIR)/Makefile.native
rm -rf $(OUTDIR)/native rm -rf $(OUTDIR)/native
find $(OUTDIR) -regex '.*\(host\|target\).native\.mk' -delete find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete
clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.clean
# GYP file generation targets. # GYP file generation targets.
OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES)) OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS))
$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \
GYP_GENERATORS=make \ GYP_GENERATORS=make \
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \ -Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=$(subst .,,$(suffix $@)) \ -Dv8_target_arch=$(subst .,,$(suffix $(basename $@))) \
-S.$(subst .,,$(suffix $@)) $(GYPFLAGS) -Dv8_optimized_debug=$(if $(findstring optdebug,$@),2,0) \
-S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS)
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \
......
...@@ -147,6 +147,8 @@ def BuildOptions(): ...@@ -147,6 +147,8 @@ def BuildOptions():
help=("The style of progress indicator" help=("The style of progress indicator"
" (verbose, dots, color, mono)"), " (verbose, dots, color, mono)"),
choices=progress.PROGRESS_INDICATORS.keys(), default="mono") choices=progress.PROGRESS_INDICATORS.keys(), default="mono")
result.add_option("--quickcheck", default=False, action="store_true",
help=("Quick check mode (skip slow/flaky tests)"))
result.add_option("--report", help="Print a summary of the tests to be run", result.add_option("--report", help="Print a summary of the tests to be run",
default=False, action="store_true") default=False, action="store_true")
result.add_option("--shard-count", result.add_option("--shard-count",
...@@ -190,7 +192,7 @@ def ProcessOptions(options): ...@@ -190,7 +192,7 @@ def ProcessOptions(options):
options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode]) options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode])
options.mode = options.mode.split(",") options.mode = options.mode.split(",")
for mode in options.mode: for mode in options.mode:
if not mode.lower() in ["debug", "release"]: if not mode.lower() in ["debug", "release", "optdebug"]:
print "Unknown mode %s" % mode print "Unknown mode %s" % mode
return False return False
if options.arch in ["auto", "native"]: if options.arch in ["auto", "native"]:
...@@ -226,9 +228,9 @@ def ProcessOptions(options): ...@@ -226,9 +228,9 @@ def ProcessOptions(options):
return reduce(lambda x, y: x + y, args) <= 1 return reduce(lambda x, y: x + y, args) <= 1
if not excl(options.no_stress, options.stress_only, options.no_variants, if not excl(options.no_stress, options.stress_only, options.no_variants,
bool(options.variants)): bool(options.variants), options.quickcheck):
print("Use only one of --no-stress, --stress-only, --no-variants or " print("Use only one of --no-stress, --stress-only, --no-variants, "
"--variants.") "--variants, or --quickcheck.")
return False return False
if options.no_stress: if options.no_stress:
VARIANTS = ["default", "nocrankshaft"] VARIANTS = ["default", "nocrankshaft"]
...@@ -241,6 +243,12 @@ def ProcessOptions(options): ...@@ -241,6 +243,12 @@ def ProcessOptions(options):
if not set(VARIANTS).issubset(VARIANT_FLAGS.keys()): if not set(VARIANTS).issubset(VARIANT_FLAGS.keys()):
print "All variants must be in %s" % str(VARIANT_FLAGS.keys()) print "All variants must be in %s" % str(VARIANT_FLAGS.keys())
return False return False
if options.quickcheck:
VARIANTS = ["default", "stress"]
options.flaky_tests = "skip"
options.slow_tests = "skip"
options.pass_fail_tests = "skip"
if not options.shell_dir: if not options.shell_dir:
if options.shell: if options.shell:
print "Warning: --shell is deprecated, use --shell-dir instead." print "Warning: --shell is deprecated, use --shell-dir instead."
...@@ -339,6 +347,9 @@ def Execute(arch, mode, args, options, suites, workspace): ...@@ -339,6 +347,9 @@ def Execute(arch, mode, args, options, suites, workspace):
"%s.%s" % (arch, mode)) "%s.%s" % (arch, mode))
shell_dir = os.path.relpath(shell_dir) shell_dir = os.path.relpath(shell_dir)
if mode == "optdebug":
mode = "debug" # "optdebug" is just an alias.
# Populate context object. # Populate context object.
mode_flags = MODE_FLAGS[mode] mode_flags = MODE_FLAGS[mode]
timeout = options.timeout timeout = options.timeout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment