mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 11:17:31 +00:00
[lit] Avoid CRLFs in bash scripts on Windows
Native Windows Python will do line ending translation by default, which we don't want in bash scripts. If we're not native Windows Python, then 'b' is ignored. llvm-svn: 177602
This commit is contained in:
parent
19c2f0143b
commit
804b51ca54
@ -277,7 +277,10 @@ def executeScript(test, litConfig, tmpBase, commands, cwd):
|
||||
script += '.bat'
|
||||
|
||||
# Write script file
|
||||
f = open(script,'w')
|
||||
mode = 'w'
|
||||
if litConfig.isWindows and not isWin32CMDEXE:
|
||||
mode += 'b' # Avoid CRLFs when writing bash scripts.
|
||||
f = open(script, mode)
|
||||
if isWin32CMDEXE:
|
||||
f.write('\nif %ERRORLEVEL% NEQ 0 EXIT\n'.join(commands))
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user