diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/dotest.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 31b48dc..47a3c2e 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -43,6 +43,7 @@ from . import lldbtest_config from . import test_categories from . import test_result from ..support import seven +from ..support import temp_file def is_exe(fpath): @@ -785,8 +786,8 @@ def canRunLibcxxTests(): return True, "libc++ always present" if platform == "linux": - with tempfile.NamedTemporaryFile() as f: - cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o", f.name, "-"] + with temp_file.OnDiskTempFile() as f: + cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o", f.path, "-"] p = subprocess.Popen( cmd, stdin=subprocess.PIPE, @@ -845,8 +846,8 @@ def canRunMsvcStlTests(): if platform != "windows": return False, f"Don't know how to build with MSVC's STL on {platform}" - with tempfile.NamedTemporaryFile() as f: - cmd = [configuration.compiler, "-xc++", "-o", f.name, "-E", "-"] + with temp_file.OnDiskTempFile() as f: + cmd = [configuration.compiler, "-xc++", "-o", f.path, "-E", "-"] p = subprocess.Popen( cmd, stdin=subprocess.PIPE, |