Commit ae4acbd1 authored by thomie's avatar thomie
Browse files

Testsuite Windows: don't use forward slashes in topdir path

Changing backwards slashes to forward slashes apparently confuses
msys2/mingw magic path handling. I don't quite understand why, but this
fixes it.

Test Plan: on Windows, make sure PATH does not contain
'inplace/mingw/bin' (let the testsuite driver add it), then run: make
TEST='ghcilink003 ghcilink006'. Before this patch, it would fail.

Reviewed by: Phyx, bgamari, austin

Differential Revision:
parent 96dc041a
......@@ -165,8 +165,7 @@ def get_compiler_info():
s = re.sub('[\r\n]', '', s)
rtsInfoDict = dict(eval(s))
# We use a '/'-separated path for libdir, even on Windows
config.libdir = re.sub('\\\\','/',compilerInfoDict['LibDir'])
config.libdir = compilerInfoDict['LibDir']
v = compilerInfoDict["Project version"].split('-')
config.compiler_version = v[0]
......@@ -217,7 +217,10 @@ if windows or darwin:
if line.startswith('library-dirs:'):
path = line.rstrip()
path = re.sub('^library-dirs: ', '', path)
path = re.sub('\\$topdir', topdir, path)
# Use string.replace instead of re.sub, because re.sub
# interprets backslashes in the replacement string as
# escape sequences.
path = path.replace('$topdir', topdir)
if path.startswith('"'):
path = re.sub('^"(.*)"$', '\\1', path)
path = re.sub('\\\\(.)', '\\1', path)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment