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++
|
CXX ?= g++
|
||||||
LINK ?= g++
|
LINK ?= g++
|
||||||
OUTDIR ?= out
|
OUTDIR ?= out
|
||||||
TESTJOBS ?= -j16
|
TESTJOBS ?=
|
||||||
GYPFLAGS ?=
|
GYPFLAGS ?=
|
||||||
TESTFLAGS ?=
|
TESTFLAGS ?=
|
||||||
ANDROID_NDK_ROOT ?=
|
ANDROID_NDK_ROOT ?=
|
||||||
@ -203,20 +203,20 @@ $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
|
|||||||
|
|
||||||
# Test targets.
|
# Test targets.
|
||||||
check: all
|
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') \
|
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
|
||||||
$(TESTFLAGS)
|
$(TESTFLAGS)
|
||||||
|
|
||||||
$(addsuffix .check,$(MODES)): $$(basename $$@)
|
$(addsuffix .check,$(MODES)): $$(basename $$@)
|
||||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||||
--mode=$(basename $@) $(TESTFLAGS)
|
--mode=$(basename $@) $(TESTFLAGS)
|
||||||
|
|
||||||
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
|
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
|
||||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||||
--arch=$(basename $@) $(TESTFLAGS)
|
--arch=$(basename $@) $(TESTFLAGS)
|
||||||
|
|
||||||
$(CHECKS): $$(basename $$@)
|
$(CHECKS): $$(basename $$@)
|
||||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \
|
||||||
--arch-and-mode=$(basename $@) $(TESTFLAGS)
|
--arch-and-mode=$(basename $@) $(TESTFLAGS)
|
||||||
|
|
||||||
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
$(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
||||||
@ -224,16 +224,16 @@ $(addsuffix .sync, $(ANDROID_BUILDS)): $$(basename $$@)
|
|||||||
$(shell pwd) $(ANDROID_V8)
|
$(shell pwd) $(ANDROID_V8)
|
||||||
|
|
||||||
$(addsuffix .check, $(ANDROID_BUILDS)): $$(basename $$@).sync
|
$(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 $@) \
|
--arch-and-mode=$(basename $@) \
|
||||||
--timeout=600 \
|
--timeout=600 \
|
||||||
--special-command="tools/android-run.py @"
|
--command-prefix="tools/android-run.py"
|
||||||
|
|
||||||
$(addsuffix .check, $(ANDROID_ARCHES)): \
|
$(addsuffix .check, $(ANDROID_ARCHES)): \
|
||||||
$(addprefix $$(basename $$@).,$(MODES)).check
|
$(addprefix $$(basename $$@).,$(MODES)).check
|
||||||
|
|
||||||
native.check: native
|
native.check: native
|
||||||
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
|
@tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \
|
||||||
--arch-and-mode=. $(TESTFLAGS)
|
--arch-and-mode=. $(TESTFLAGS)
|
||||||
|
|
||||||
# Clean targets. You can clean each architecture individually, or everything.
|
# 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)
|
options.shell_dir = os.path.dirname(options.shell)
|
||||||
if options.stress_only:
|
if options.stress_only:
|
||||||
VARIANT_FLAGS = [["--stress-opt", "--always-opt"]]
|
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:
|
if options.valgrind:
|
||||||
run_valgrind = os.path.join("tools", "run-valgrind.py")
|
run_valgrind = os.path.join("tools", "run-valgrind.py")
|
||||||
# This is OK for distributed running, so we don't need to set no_network.
|
# 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.
|
# Populate context object.
|
||||||
mode_flags = MODE_FLAGS[mode]
|
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]
|
options.timeout *= TIMEOUT_SCALEFACTOR[mode]
|
||||||
ctx = context.Context(arch, mode, shell_dir,
|
ctx = context.Context(arch, mode, shell_dir,
|
||||||
mode_flags, options.verbose,
|
mode_flags, options.verbose,
|
||||||
options.timeout, options.isolates,
|
timeout, options.isolates,
|
||||||
options.command_prefix,
|
options.command_prefix,
|
||||||
options.extra_flags)
|
options.extra_flags)
|
||||||
|
|
||||||
|
@ -90,7 +90,9 @@ class Runner(object):
|
|||||||
self.indicator.Starting()
|
self.indicator.Starting()
|
||||||
self._RunInternal(jobs)
|
self._RunInternal(jobs)
|
||||||
self.indicator.Done()
|
self.indicator.Done()
|
||||||
return not self.failed
|
if self.failed:
|
||||||
|
return 1
|
||||||
|
return 0
|
||||||
|
|
||||||
def _RunInternal(self, jobs):
|
def _RunInternal(self, jobs):
|
||||||
pool = multiprocessing.Pool(processes=jobs)
|
pool = multiprocessing.Pool(processes=jobs)
|
||||||
@ -147,6 +149,7 @@ class Runner(object):
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pool.terminate()
|
pool.terminate()
|
||||||
pool.join()
|
pool.join()
|
||||||
|
raise
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print("Exception: %s" % e)
|
print("Exception: %s" % e)
|
||||||
pool.terminate()
|
pool.terminate()
|
||||||
|
@ -152,6 +152,7 @@ class CompactProgressIndicator(ProgressIndicator):
|
|||||||
|
|
||||||
def Done(self):
|
def Done(self):
|
||||||
self.PrintProgress('Done')
|
self.PrintProgress('Done')
|
||||||
|
print "" # Line break.
|
||||||
|
|
||||||
def AboutToRun(self, test):
|
def AboutToRun(self, test):
|
||||||
self.PrintProgress(test.GetLabel())
|
self.PrintProgress(test.GetLabel())
|
||||||
|
Loading…
Reference in New Issue
Block a user