Skip to content

Commit 2eb15f3

Browse files
[ClangCAS] Use an accurate check for path length requirement
Set an accurate path limit for clang cas daemon to be able to spawn correctly. The original limit is slightly too large which if the temp directory path is just at the wrong length, it will break the test. rdar://102249472
1 parent 0107252 commit 2eb15f3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

clang/test/CAS/lit.local.cfg

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ config.daemon_temp_dir = tempfile.mkdtemp()
1616
config.environment['__CLANG_TEST_CC1DEPSCAND_EXTRA_ARGS'] = '-single-command'
1717

1818
# Feature for the temp directory path is not too long for certain tests.
19-
# The limit is around 100 charactors and this check will leave about 20
20-
# charactors to be used by individual tests.
21-
if len(config.daemon_temp_dir) < 80:
19+
# The limit on Darwin is 104 charactors and the default spawning daemon from
20+
# clang will take 30 char. This will leave enough room for auto spawned daemon
21+
# and also leave some room for each tests to use afterwards.
22+
if len(config.daemon_temp_dir) < 74:
2223
config.available_features.add('clang-cc1daemon')
2324
config.substitutions.append(('%{clang-daemon-dir}', config.daemon_temp_dir))
2425
config.environment['TMPDIR'] = config.daemon_temp_dir

0 commit comments

Comments
 (0)