forked from OSchip/llvm-project
MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat
files. llvm-svn: 77071
This commit is contained in:
parent
595c98729b
commit
a2f6b0dde0
|
@ -24,7 +24,9 @@ import subprocess
|
|||
import sys
|
||||
|
||||
# Increase determinism by explicitly choosing the environment.
|
||||
kChildEnv = { 'PATH' : os.environ.get('PATH','') }
|
||||
kChildEnv = {}
|
||||
for var in ('PATH', 'SYSTEMROOT'):
|
||||
kChildEnv[var] = os.environ.get(var, '')
|
||||
|
||||
kSystemName = platform.system()
|
||||
|
||||
|
@ -170,7 +172,11 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
|
|||
|
||||
# Write script file
|
||||
f = open(SCRIPT,'w')
|
||||
f.write(' &&\n'.join(scriptLines))
|
||||
if kSystemName == 'Windows':
|
||||
f.write('\nif %ERRORLEVEL% NEQ 0 EXIT\n'.join(scriptLines))
|
||||
f.write('\n')
|
||||
else:
|
||||
f.write(' &&\n'.join(scriptLines))
|
||||
f.close()
|
||||
|
||||
outputFile = open(OUTPUT,'w')
|
||||
|
|
Loading…
Reference in New Issue