Reviewers: Michael Starzinger,
Message:
PTAL.
Description:
tools/run-tests.py: shlex.split() the value of --command-prefix
BUG=171553
Please review this at https://codereview.chromium.org/12049034/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M test/cctest/testcfg.py
M tools/run-tests.py
M tools/testrunner/local/execution.py
M tools/testrunner/objects/context.py
Index: test/cctest/testcfg.py
diff --git a/test/cctest/testcfg.py b/test/cctest/testcfg.py
index
1d03a845f53d0bd1f8bdb8c81c0e8bc66a74ddfd..7bcccfa2cc6dcc4ffa91367bb253c633a8c08e11
100644
--- a/test/cctest/testcfg.py
+++ b/test/cctest/testcfg.py
@@ -47,10 +47,10 @@ class CcTestSuite(testsuite.TestSuite):
def ListTests(self, context):
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
if utils.IsWindows():
- shell += '.exe'
- output = commands.Execute([context.command_prefix,
- shell,
- '--list',
+ shell += ".exe"
+ output = commands.Execute(context.command_prefix +
+ [shell,
+ "--list",
context.extra_flags])
if output.exit_code != 0:
print output.stdout
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index
f20af169d224a70037bf06e4cc0c1a0cac0d55fb..c2c43a9c8c0f6b99a4f30b45b144470dbb32fd9b
100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -32,6 +32,7 @@ import multiprocessing
import optparse
import os
from os.path import join
+import shlex
import subprocess
import sys
import time
@@ -176,6 +177,7 @@ def ProcessOptions(options):
print("Specifying --command-prefix disables network distribution, "
"running tests locally.")
options.no_network = True
+ options.command_prefix = shlex.split(options.command_prefix)
if options.j == 0:
options.j = multiprocessing.cpu_count()
if options.no_stress:
@@ -189,7 +191,7 @@ def ProcessOptions(options):
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.
- options.command_prefix = ("python -u " + run_valgrind +
+ options.command_prefix = (["python", "-u", run_valgrind] +
options.command_prefix)
return True
Index: tools/testrunner/local/execution.py
diff --git a/tools/testrunner/local/execution.py
b/tools/testrunner/local/execution.py
index
2e37fcbcdb1d9c9fb553881d464c0a3dc0d85f25..9ca3991a04218d4a58d07bd6233a3b57dba983ff
100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -167,7 +167,7 @@ class Runner(object):
d8testflag = ["--test"]
if utils.IsWindows():
shell += ".exe"
- cmd = ([self.context.command_prefix] +
+ cmd = (self.context.command_prefix +
[os.path.abspath(os.path.join(self.context.shell_dir, shell))] +
d8testflag +
test.suite.GetFlagsForTestCase(test, self.context) +
Index: tools/testrunner/objects/context.py
diff --git a/tools/testrunner/objects/context.py
b/tools/testrunner/objects/context.py
index
b72284b648fa9ba53123a51d3cd97d2f5e266ee9..3ea215a708d00c319ea4f691f0dad48cd0008803
100644
--- a/tools/testrunner/objects/context.py
+++ b/tools/testrunner/objects/context.py
@@ -41,10 +41,10 @@ class Context():
def Pack(self):
return [self.arch, self.mode, self.mode_flags, self.timeout,
self.isolates,
- self.extra_flags]
+ self.command_prefix, self.extra_flags]
@staticmethod
def Unpack(packed):
# For the order of the fields, refer to Pack() above.
return Context(packed[0], packed[1], None, packed[2], False,
- packed[3], packed[4], "", packed[5])
+ packed[3], packed[4], packed[5], packed[6])
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev