Use tools/run-tests.py for "check" targets in the top-level Makefile.
Bonus content: a few minor fixes for run-tests.py Review URL: https://codereview.chromium.org/11184039 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
a7f3edb818
commit
230bec1274
16
Makefile
16
Makefile
@ -30,7 +30,7 @@
|
||||
CXX ?= g++
|
||||
LINK ?= g++
|
||||
OUTDIR ?= out
|
||||
TESTJOBS ?= -j16
|
||||
TESTJOBS ?=
|
||||
GYPFLAGS ?=
|
||||
TESTFLAGS ?=
|
||||
ANDROID_NDK_ROOT ?=
|
||||
@ -203,20 +203,20 @@ $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
|
||||
|
||||
# Test targets.
|
||||
check: all
|
||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
|
||||
$(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check,$(MODES)): $$(basename $$@)
|
||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--mode=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
|
||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(CHECKS): $$(basename $$@)
|
||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) $(TESTFLAGS)
|
||||
|
||||
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
||||
@ -224,16 +224,16 @@ $(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
||||
$(shell pwd) $(ANDROID_V8)
|
||||
|
||||
$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
|
||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||
--arch-and-mode=$(basename $@) \
|
||||
--timeout=600 \
|
||||
--special-command="tools/android-run.py @"
|
||||
--command-prefix="tools/android-run.py"
|
||||
|
||||
$(addsuffix .check, $(ANDROID_ARCHES)): \
|
||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||
|
||||
native.check: native
|
||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
|
||||
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
|
||||
--arch-and-mode=. $(TESTFLAGS)
|
||||
|
||||
# Clean targets. You can clean each architecture individually, or everything.
|
||||
|
@ -174,12 +174,6 @@ def ProcessOptions(options):
|
||||
options.shell_dir = os.path.dirname(options.shell)
|
||||
if options.stress_only:
|
||||
VARIANT_FLAGS = [["--stress-opt", "--always-opt"]]
|
||||
# Simulators are slow, therefore allow a longer default timeout.
|
||||
if options.timeout == -1:
|
||||
if options.arch == "arm" or options.arch == "mipsel":
|
||||
options.timeout = 2 * TIMEOUT_DEFAULT;
|
||||
else:
|
||||
options.timeout = TIMEOUT_DEFAULT;
|
||||
if options.valgrind:
|
||||
run_valgrind = os.path.join("tools", "run-valgrind.py")
|
||||
# This is OK for distributed running, so we don't need to set no_network.
|
||||
@ -264,10 +258,18 @@ def Execute(arch, mode, args, options, suites, workspace):
|
||||
|
||||
# Populate context object.
|
||||
mode_flags = MODE_FLAGS[mode]
|
||||
timeout = options.timeout
|
||||
if timeout == -1:
|
||||
# Simulators are slow, therefore allow a longer default timeout.
|
||||
if arch in ["android", "arm", "mipsel"]:
|
||||
timeout = 2 * TIMEOUT_DEFAULT;
|
||||
else:
|
||||
timeout = TIMEOUT_DEFAULT;
|
||||
|
||||
options.timeout *= TIMEOUT_SCALEFACTOR[mode]
|
||||
ctx = context.Context(arch, mode, shell_dir,
|
||||
mode_flags, options.verbose,
|
||||
options.timeout, options.isolates,
|
||||
timeout, options.isolates,
|
||||
options.command_prefix,
|
||||
options.extra_flags)
|
||||
|
||||
|
@ -90,7 +90,9 @@ class Runner(object):
|
||||
self.indicator.Starting()
|
||||
self._RunInternal(jobs)
|
||||
self.indicator.Done()
|
||||
return not self.failed
|
||||
if self.failed:
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def _RunInternal(self, jobs):
|
||||
pool = multiprocessing.Pool(processes=jobs)
|
||||
@ -147,6 +149,7 @@ class Runner(object):
|
||||
except KeyboardInterrupt:
|
||||
pool.terminate()
|
||||
pool.join()
|
||||
raise
|
||||
except Exception, e:
|
||||
print("Exception: %s" % e)
|
||||
pool.terminate()
|
||||
|
@ -152,6 +152,7 @@ class CompactProgressIndicator(ProgressIndicator):
|
||||
|
||||
def Done(self):
|
||||
self.PrintProgress('Done')
|
||||
print "" # Line break.
|
||||
|
||||
def AboutToRun(self, test):
|
||||
self.PrintProgress(test.GetLabel())
|
||||
|
Loading…
Reference in New Issue
Block a user