Skip to content

Commit c65054a

Browse files
authored
Remove remaining uses of "%T". (#13227)
1 parent ff9c865 commit c65054a

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

test/swift_test.py

+3-17
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,6 @@ def __init__(self, coverage_mode=None, execute_external=True):
3131
self.skipped_tests = set()
3232

3333
def before_test(self, test, litConfig):
34-
_, tmp_base = lit.TestRunner.getTempPaths(test)
35-
36-
# Apparently despite the docs, tmpDir is not actually unique for each
37-
# test, but tmpBase is. Remove it here and add a tmpBase substitution
38-
# in before_test. Speculative fix for rdar://32928464.
39-
try:
40-
percentT_index = \
41-
[x[0] for x in test.config.substitutions].index('%T')
42-
except ValueError:
43-
pass
44-
else:
45-
test.config.substitutions.pop(percentT_index)
46-
47-
test.config.substitutions.append(
48-
('%T', '$(mkdir -p %r && echo %r)' % (tmp_base, tmp_base)))
49-
5034
if self.coverage_mode:
5135
# FIXME: The compiler crashers run so fast they fill up the
5236
# merger's queue (and therefore the build bot's disk)
@@ -56,7 +40,9 @@ def before_test(self, test, litConfig):
5640
return
5741

5842
if self.coverage_mode == "NOT_MERGED":
59-
profdir = tmp_base + '.profdir'
43+
execpath = test.getExecPath()
44+
profdir = os.path.join(os.path.dirname(execpath), "Output",
45+
os.path.basename(execpath) + '.profdir')
6046
if not os.path.exists(profdir):
6147
os.makedirs(profdir)
6248

0 commit comments

Comments
 (0)