]> granicus.if.org Git - clang/commitdiff
MultiTestRunner: Explicitly define child environment, the only variable we need
authorDaniel Dunbar <daniel@zuster.org>
Sat, 25 Jul 2009 10:14:19 +0000 (10:14 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 25 Jul 2009 10:14:19 +0000 (10:14 +0000)
to import is the PATH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77061 91177308-0d34-0410-b5e6-96231b3b80d8

utils/test/TestRunner.py

index c767103377661811033dce9ab3a49402d5b18bda..246a22b43899707ab6be5d04b3b348c1240a02bd 100755 (executable)
@@ -23,10 +23,8 @@ import signal
 import subprocess
 import sys
 
-# Increase determinism for things that use the terminal width.
-#
-# FIXME: Find a better place for this hack.
-os.environ['COLUMNS'] = '0'
+# Increase determinism by explicitly choosing the environment.
+kChildEnv = { 'PATH' : os.environ.get('PATH','') }
 
 kSystemName = platform.system()
 
@@ -163,7 +161,8 @@ def runOneTest(FILENAME, SUBST, OUTPUT, TESTNAME, CLANG, CLANGCC,
                              cwd=os.path.dirname(FILENAME),
                              stdin=subprocess.PIPE,
                              stdout=subprocess.PIPE,
-                             stderr=subprocess.PIPE)
+                             stderr=subprocess.PIPE,
+                             env=kChildEnv)
         out,err = p.communicate()
         outputFile.write(out)
         outputFile.write(err)