MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat

files.

llvm-svn: 77071
This commit is contained in:
Daniel Dunbar 2009-07-25 12:57:15 +00:00
parent 595c98729b
commit a2f6b0dde0
1 changed files with 8 additions and 2 deletions

View File

@ -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')