summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-06-04 10:49:51 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-06-09 13:23:23 +0200
commitbb9967121f2383b857680b47b6bc20607f8fd1ff (patch)
treebc60252f0beeff0fac29635c8603469043a5bc2c /testsuite/driver/testlib.py
parent3b55659d4f54e503f4e550d762bc55a2650ed13d (diff)
downloadhaskell-bb9967121f2383b857680b47b6bc20607f8fd1ff.tar.gz
Revert "The test runner now also works under the msys-native Python."
To make the test runner work under msys-native Python... Commit 5258566ee5c89aa757b0cf1433169346319c018f broke the msys testsuite driver (#10441). It changed the quoting of `config.compiler` from single quotes to double quote, which turns out to not be compatible with what the function `passThroughCmd` expected. We could fix `passThroughCmd` to handle the case where `config.compiler` is double quoted, and scatter some notes around to make sure the quoting done in various places of the testsuite driver stay compatible. Instead, this commit reverts 101c62e26286353dd3fac1ef54323529b64c9902, which introdced the function `passThroughCmd` in the first place (#9626). ezyang reports that doing this revert fixes the testsuite driver for him using the the following version of msys2: msys2-keyring r8.3864337-1 msys2-runtime 2.1.0.16351.cd3184b-1 msys2-runtime-devel 2.1.0.16351.cd3184b-1 msys2-w32api-headers 5.0.0.4456.c8b6742-1 msys2-w32api-runtime 5.0.0.4455.32db221-1 Ideally we'd know what minimum version of msys2 we require, but for now this fix is better than nothing. Only gintas ever reported the original problem, and he actually mentioned shortly afterwards: "This may have been fixed by a recent release of msys2, but I am not sure." Differential Revision: https://phabricator.haskell.org/D952
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 63b42e8bb1..db3ada4544 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1806,25 +1806,9 @@ def rawSystem(cmd_and_args):
cmd = cmd_and_args[0]
return subprocess.call([strip_quotes(cmd)] + cmd_and_args[1:])
-# When running under native msys Python, any invocations of non-msys binaries,
-# including timeout.exe, will have their arguments munged according to some
-# heuristics, which leads to malformed command lines (#9626). The easiest way
-# to avoid problems is to invoke through /usr/bin/cmd which sidesteps argument
-# munging because it is a native msys application.
-def passThroughCmd(cmd_and_args):
- args = []
- # cmd needs a Windows-style path for its first argument.
- args.append(cmd_and_args[0].replace('/', '\\'))
- # Other arguments need to be quoted to deal with spaces.
- args.extend(['"%s"' % arg for arg in cmd_and_args[1:]])
- return ["cmd", "/c", " ".join(args)]
-
# Note that this doesn't handle the timeout itself; it is just used for
# commands that have timeout handling built-in.
def rawSystemWithTimeout(cmd_and_args):
- if config.os == 'mingw32' and sys.executable.startswith('/usr'):
- # This is only needed when running under msys python.
- cmd_and_args = passThroughCmd(cmd_and_args)
r = rawSystem(cmd_and_args)
if r == 98:
# The python timeout program uses 98 to signal that ^C was pressed