Skip to content

Fix flaky Driver tests #27780

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
Oct 19, 2019
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
14 changes: 11 additions & 3 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1553,9 +1553,17 @@ if hasattr(config, 'target_cc_options'):
else:
config.substitutions.append(('%target-cc-options', ''))

config.substitutions.append(
(r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)',
SubstituteCaptures(r'ln \1 \2 || cp \1 \2')))
# WORKAROUND(rdar://53507844): On some macOS versions, we see flaky failures in
# tests which create a hard link to an executable and immediately invoke it.
# Work around this by always copying on Darwin.
if platform.system() == 'Darwin':
config.substitutions.append(
(r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)',
SubstituteCaptures(r'cp \1 \2')))
else:
config.substitutions.append(
(r'%hardlink-or-copy\(from: *(.*), *to: *(.*)\)',
SubstituteCaptures(r'ln \1 \2 || cp \1 \2')))

config.substitutions.append(('%utils', config.swift_utils))
config.substitutions.append(('%line-directive', '%r %s' % (sys.executable, config.line_directive)))
Expand Down