[libcxx-commits] [libcxx] 178a0c8 - [libc++] Make sure temporary config files are closed

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 28 14:15:46 PDT 2020


Author: Louis Dionne
Date: 2020-04-28T17:13:03-04:00
New Revision: 178a0c80baabed805449c23c2c0af2b993cfcbd4

URL: https://github.com/llvm/llvm-project/commit/178a0c80baabed805449c23c2c0af2b993cfcbd4
DIFF: https://github.com/llvm/llvm-project/commit/178a0c80baabed805449c23c2c0af2b993cfcbd4.diff

LOG: [libc++] Make sure temporary config files are closed

Otherwise, trying to remove the file triggers an error on Windows.

Added: 
    

Modified: 
    libcxx/utils/libcxx/test/dsl.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/dsl.py b/libcxx/utils/libcxx/test/dsl.py
index 9c0d68e71f14..452e4b462d24 100644
--- a/libcxx/utils/libcxx/test/dsl.py
+++ b/libcxx/utils/libcxx/test/dsl.py
@@ -39,6 +39,7 @@ def _makeConfigTest(config):
   if not os.path.exists(sourceRoot):
     os.makedirs(sourceRoot)
   tmp = tempfile.NamedTemporaryFile(dir=sourceRoot, delete=False)
+  tmp.close()
   pathInSuite = [os.path.relpath(tmp.name, sourceRoot)]
   class TestWrapper(lit.Test.Test):
     def __enter__(self):       return self


        


More information about the libcxx-commits mailing list