Skip to content

Commit 502fe9e

Browse files
authored
Merge pull request #15825 from davezarzycki/do_not_fill_slash_tmp
[Testing] Don't fill up /tmp while bisecting
2 parents 53be298 + 9e91162 commit 502fe9e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/lit.cfg

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import os
2222
import platform
2323
import re
24+
import shutil
2425
import subprocess
2526
import sys
26-
import tempfile
2727
import socket
2828
import glob
2929
import pipes
@@ -326,13 +326,15 @@ config.swift_frontend_test_options = os.environ.get('SWIFT_FRONTEND_TEST_OPTIONS
326326
config.swift_driver_test_options = os.environ.get('SWIFT_DRIVER_TEST_OPTIONS', '')
327327
config.sil_test_options = os.environ.get('SIL_TEST_OPTIONS', '')
328328

329-
clang_module_cache_path = tempfile.mkdtemp(prefix="swift-testsuite-clang-module-cache")
329+
clang_module_cache_path = config.swift_test_results_dir + "/clang-module-cache"
330+
shutil.rmtree(clang_module_cache_path, ignore_errors=True)
330331
mcp_opt = "-module-cache-path %r" % clang_module_cache_path
331332
clang_mcp_opt = "-fmodules-cache-path=%r" % clang_module_cache_path
332333
lit_config.note("Using Clang module cache: " + clang_module_cache_path)
333334
lit_config.note("Using test results dir: " + config.swift_test_results_dir)
334335

335-
completion_cache_path = tempfile.mkdtemp(prefix="swift-testsuite-completion-cache")
336+
completion_cache_path = config.swift_test_results_dir + "/completion-cache"
337+
shutil.rmtree(completion_cache_path, ignore_errors=True)
336338
ccp_opt = "-completion-cache-path %r" % completion_cache_path
337339
lit_config.note("Using code completion cache: " + completion_cache_path)
338340

0 commit comments

Comments
 (0)