[Mlir-commits] [mlir] 62eae83 - [mlir] Fix incorrect temporary file handling on windows
Denys Shabalin
llvmlistbot at llvm.org
Thu Oct 20 08:55:49 PDT 2022
Author: Denys Shabalin
Date: 2022-10-20T17:55:43+02:00
New Revision: 62eae8372d4c83b27b159dce5c9d10ffe7392bb8
URL: https://github.com/llvm/llvm-project/commit/62eae8372d4c83b27b159dce5c9d10ffe7392bb8
DIFF: https://github.com/llvm/llvm-project/commit/62eae8372d4c83b27b159dce5c9d10ffe7392bb8.diff
LOG: [mlir] Fix incorrect temporary file handling on windows
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D136364
Added:
Modified:
mlir/test/python/execution_engine.py
Removed:
################################################################################
diff --git a/mlir/test/python/execution_engine.py b/mlir/test/python/execution_engine.py
index 92471cc70121..c51880378963 100644
--- a/mlir/test/python/execution_engine.py
+++ b/mlir/test/python/execution_engine.py
@@ -557,7 +557,7 @@ def testNanoTime():
# Test that nano time clock is available.
# CHECK-LABEL: TEST: testDumpToObjectFile
def testDumpToObjectFile():
- _, object_path = tempfile.mkstemp(suffix=".o")
+ fd, object_path = tempfile.mkstemp(suffix=".o")
try:
with Context():
@@ -585,6 +585,7 @@ def testDumpToObjectFile():
print(f"Object file is empty: {os.path.getsize(object_path) == 0}")
finally:
+ os.close(fd)
os.remove(object_path)
More information about the Mlir-commits
mailing list