Lit: LIT_PRESERVES_TMP should be aware of TMPDIR, too.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 17 Oct 2013 13:11:13 +0000 (13:11 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 17 Oct 2013 13:11:13 +0000 (13:11 +0000)
TMPDIR is preferred in Unix.

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

utils/lit/lit/TestingConfig.py

index 748cf1f6b80e39f1ec795a1b7078c5aaefb2aace..4a34b77e175b9584e6ce1eedc8c23f0bcbe4a9e7 100644 (file)
@@ -35,13 +35,14 @@ class TestingConfig:
                     'TMP' : os.environ.get('TMP',''),
                     })
 
-        # The option to preserve TMP (and TEMP).
+        # The option to preserve TEMP, TMP, and TMPDIR.
         # This is intended to check how many temporary files would be generated
-        # in automated builders.
+        # (and be not cleaned up) in automated builders.
         if os.environ.has_key('LIT_PRESERVES_TMP'):
             environment.update({
                     'TEMP' : os.environ.get('TEMP',''),
                     'TMP' : os.environ.get('TMP',''),
+                    'TMPDIR' : os.environ.get('TMPDIR',''),
                     })
 
         # Set the default available features based on the LitConfig.