mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
On Windows, replace each occurrence of '\' by '\\' on the replacement string. This is necessary to prevent re.sub from replacing escape sequences occurring in path.
For example: llvm\tools\clang\test was replaced by llvm <tab> ools\clang <tab> est llvm-svn: 123070
This commit is contained in:
parent
2fb7c9c272
commit
2094592a6f
@ -451,12 +451,10 @@ def parseIntegratedTestScript(test, normalize_slashes=False):
|
||||
# expression pattern a with substitution b in line ln.
|
||||
def processLine(ln):
|
||||
# Apply substitutions
|
||||
# FIXME: Investigate why re.sub doesn't work on Windows
|
||||
for a,b in substitutions:
|
||||
if kIsWindows:
|
||||
ln = ln.replace(a,b)
|
||||
else:
|
||||
ln = re.sub(a, b, ln)
|
||||
b = b.replace("\\","\\\\")
|
||||
ln = re.sub(a, b, ln)
|
||||
|
||||
# Strip the trailing newline and any extra whitespace.
|
||||
return ln.strip()
|
||||
|
Loading…
Reference in New Issue
Block a user