Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath defaults...
[oota-llvm.git] / test / Unit / lit.cfg
index a41f0937f9a9f070ddde69c00722b06563fa8cd8..35092964a5cd2a45b1e8f1893145db71566df7ac 100644 (file)
@@ -21,6 +21,13 @@ if llvm_obj_root is not None:
 llvm_build_mode = getattr(config, 'llvm_build_mode', "Debug")
 config.test_format = lit.formats.GoogleTest(llvm_build_mode, 'Tests')
 
+# Propagate the temp directory. Windows requires this because it uses \Windows\
+# if none of these are present.
+if 'TMP' in os.environ:
+    config.environment['TMP'] = os.environ['TMP']
+if 'TEMP' in os.environ:
+    config.environment['TEMP'] = os.environ['TEMP']
+
 ###
 
 # If necessary, point the dynamic loader at libLLVM.so.