Skip to content

Commit 26f0475

Browse files
author
Dave Abrahams
authored
Speculative fix for test output race conditions
Sometimes two tests will simultaneously try to write the same file in the temporary directory. See rdar://31520207
1 parent a5f87c0 commit 26f0475

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/lit.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,11 @@ completion_cache_path = tempfile.mkdtemp(prefix="swift-testsuite-completion-cach
357357
ccp_opt = "-completion-cache-path %r" % completion_cache_path
358358
lit_config.note("Using code completion cache: " + completion_cache_path)
359359

360+
# Apparently despite the docs, tmpDir is not actually unique for each test, but
361+
# tmpBase is. Speculative fix for rdar://31520207.
362+
config.substitutions.remove( ('%T', tmpDir) )
363+
config.substitutions.append( ('%T', tmpBase) )
364+
360365
config.substitutions.append( ('%swift_obj_root', config.swift_obj_root) )
361366
config.substitutions.append( ('%swift_src_root', config.swift_src_root) )
362367
config.substitutions.append( ('%{python}', sys.executable) )

0 commit comments

Comments
 (0)