Support OUTDIR variable for tests triggered by Makefile

TEST="make -j16 check OUTDIR=whatever" works as expected

Review URL: http://codereview.chromium.org/7606025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ff13ab45
......@@ -74,19 +74,16 @@ $(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@)
# Test targets.
check: all
@tools/test-wrapper-gypbuild.py $(TESTJOBS)
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)
debug.check: debug
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --mode=debug
release.check: release
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --mode=release
$(addsuffix .check,$(MODES)): $$(basename $$@)
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --mode=$(basename $@)
$(addsuffix .check,$(ARCHES)): $$(basename $$@)
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --arch=$(basename $@)
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch=$(basename $@)
$(CHECKS): $$(basename $$@)
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --arch-and-mode=$(basename $@)
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch-and-mode=$(basename $@)
# Clean targets. You can clean each architecture individually, or everything.
$(addsuffix .clean,$(ARCHES)):
......
......@@ -50,6 +50,9 @@ def BuildOptions():
result.add_option("--arch-and-mode",
help='Architecture and mode in the format "arch.mode"',
default=None)
result.add_option("--outdir",
help='Base output directory',
default='out')
# Flags this wrapper script handles itself:
result.add_option("-m", "--mode",
......@@ -208,7 +211,7 @@ def Main():
for mode in options.mode:
for arch in options.arch:
print ">>> running tests for %s.%s" % (arch, mode)
shell = workspace + '/out/' + arch + '.' + mode + "/shell"
shell = workspace + '/' + options.outdir + '/' + arch + '.' + mode + "/d8"
child = subprocess.Popen(' '.join(args_for_children +
['--mode=' + mode] +
['--shell=' + shell]),
......
......@@ -1273,12 +1273,12 @@ def ProcessOptions(options):
if options.special_command:
options.special_command += " --crankshaft"
else:
options.special_command = "@--crankshaft"
if options.shell == "d8":
options.special_command = "@ --crankshaft"
if options.shell.endswith("d8"):
if options.special_command:
options.special_command += " --test"
else:
options.special_command = "@--test"
options.special_command = "@ --test"
if options.noprof:
options.scons_flags.append("prof=off")
options.scons_flags.append("profilingsupport=off")
......
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