Revision: 13469
Author:   [email protected]
Date:     Wed Jan 23 03:41:56 2013
Log:      tools/run-tests.py: shlex.split() the value of --command-prefix

BUG=171553

Review URL: https://codereview.chromium.org/12049034
http://code.google.com/p/v8/source/detail?r=13469

Modified:
 /branches/bleeding_edge/test/cctest/testcfg.py
 /branches/bleeding_edge/tools/run-tests.py
 /branches/bleeding_edge/tools/testrunner/local/execution.py
 /branches/bleeding_edge/tools/testrunner/objects/context.py

=======================================
--- /branches/bleeding_edge/test/cctest/testcfg.py      Fri Jan 18 04:44:36 2013
+++ /branches/bleeding_edge/test/cctest/testcfg.py      Wed Jan 23 03:41:56 2013
@@ -47,10 +47,10 @@
   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
=======================================
--- /branches/bleeding_edge/tools/run-tests.py  Fri Jan 18 04:20:59 2013
+++ /branches/bleeding_edge/tools/run-tests.py  Wed Jan 23 03:41:56 2013
@@ -32,6 +32,7 @@
 import optparse
 import os
 from os.path import join
+import shlex
 import subprocess
 import sys
 import time
@@ -176,6 +177,7 @@
     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 @@
   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

=======================================
--- /branches/bleeding_edge/tools/testrunner/local/execution.py Fri Jan 18 04:44:36 2013 +++ /branches/bleeding_edge/tools/testrunner/local/execution.py Wed Jan 23 03:41:56 2013
@@ -167,7 +167,7 @@
       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) +
=======================================
--- /branches/bleeding_edge/tools/testrunner/objects/context.py Mon Sep 24 02:38:46 2012 +++ /branches/bleeding_edge/tools/testrunner/objects/context.py Wed Jan 23 03:41:56 2013
@@ -41,10 +41,10 @@

   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

Reply via email to