Skip to content

Remove remaining uses of "%T". #13227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions test/swift_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,6 @@ def __init__(self, coverage_mode=None, execute_external=True):
self.skipped_tests = set()

def before_test(self, test, litConfig):
_, tmp_base = lit.TestRunner.getTempPaths(test)

# Apparently despite the docs, tmpDir is not actually unique for each
# test, but tmpBase is. Remove it here and add a tmpBase substitution
# in before_test. Speculative fix for rdar://32928464.
try:
percentT_index = \
[x[0] for x in test.config.substitutions].index('%T')
except ValueError:
pass
else:
test.config.substitutions.pop(percentT_index)

test.config.substitutions.append(
('%T', '$(mkdir -p %r && echo %r)' % (tmp_base, tmp_base)))

if self.coverage_mode:
# FIXME: The compiler crashers run so fast they fill up the
# merger's queue (and therefore the build bot's disk)
Expand All @@ -56,7 +40,9 @@ def before_test(self, test, litConfig):
return

if self.coverage_mode == "NOT_MERGED":
profdir = tmp_base + '.profdir'
execpath = test.getExecPath()
profdir = os.path.join(os.path.dirname(execpath), "Output",
os.path.basename(execpath) + '.profdir')
if not os.path.exists(profdir):
os.makedirs(profdir)

Expand Down