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
import optparse
import os
from os.path import join
+import shlex
import subprocess
import sys
import time
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:
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
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) +
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])