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

Otherwise, trying to remove the file triggers an error on Windows.
This commit is contained in:
Louis Dionne 2020-04-28 17:12:18 -04:00
parent 0ed276bb08
commit 178a0c80ba
1 changed files with 1 additions and 0 deletions

View File

@ -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