Fix Windows testsuite driver
authorThomas Miedema <thomasmiedema@gmail.com>
Tue, 17 Mar 2015 11:08:59 +0000 (12:08 +0100)
committerThomas Miedema <thomasmiedema@gmail.com>
Tue, 17 Mar 2015 11:09:07 +0000 (12:09 +0100)
This got broken in commit 5258566.

testsuite/driver/testlib.py

index 59230ab..961f545 100644 (file)
@@ -2272,17 +2272,17 @@ def printFailingTestInfosSummary(file, testInfos):
                           ' (' + ','.join(testInfos[directory][test][reason]) + ')\n')
     file.write('\n')
 
-def getStdout(cmd):
+def getStdout(cmd_and_args):
     if have_subprocess:
-        p = subprocess.Popen(strip_quotes(cmd),
+        p = subprocess.Popen([strip_quotes(cmd_and_args[0])] + cmd_and_args[1:],
                              stdout=subprocess.PIPE,
                              stderr=subprocess.PIPE)
         (stdout, stderr) = p.communicate()
         r = p.wait()
         if r != 0:
-            raise Exception("Command failed: " + str(cmd))
+            raise Exception("Command failed: " + str(cmd_and_args))
         if stderr != '':
-            raise Exception("stderr from command: " + str(cmd))
+            raise Exception("stderr from command: " + str(cmd_and_args))
         return stdout
     else:
         raise Exception("Need subprocess to get stdout, but don't have it")