From a2f6b0dde05bd27b64283adb78c555bb40216742 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 25 Jul 2009 12:57:15 +0000 Subject: [PATCH] MultiTestRunner/Win32: Add SYSTEMROOT to environment, replace '&&' in .bat files. llvm-svn: 77071 --- clang/utils/test/TestRunner.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clang/utils/test/TestRunner.py b/clang/utils/test/TestRunner.py index ba43330d9a68..cfbfe6b3b748 100755 --- a/clang/utils/test/TestRunner.py +++ b/clang/utils/test/TestRunner.py @@ -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')