Skip to content

Commit b64bd95

Browse files
authored
Merge pull request #36222 from porglezomp-misc/swift-driver-lit-tests
[build-script] Pass --lit-test-dir while testing swift-driver
2 parents 81db4cf + cb58d25 commit b64bd95

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

utils/swift_build_support/swift_build_support/products/swiftdriver.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ def run_build_script_helper(action, host_target, product, args):
9494
foundation_build_dir = os.path.join(
9595
build_root, '%s-%s' % ('foundation', host_target))
9696

97+
# Pass the swift lit tests if we're testing and the Swift tests were built
98+
swift_build_dir = os.path.join(
99+
build_root, 'swift-{}'.format(host_target))
100+
lit_test_dir = os.path.join(
101+
swift_build_dir, 'test-{}'.format(host_target))
102+
97103
is_release = product.is_release()
98104
configuration = 'release' if is_release else 'debug'
99105
helper_cmd = [
@@ -114,6 +120,10 @@ def run_build_script_helper(action, host_target, product, args):
114120
helper_cmd += [
115121
'--foundation-build-dir', foundation_build_dir
116122
]
123+
if os.path.exists(lit_test_dir) and action == 'test':
124+
helper_cmd += [
125+
'--lit-test-dir', lit_test_dir
126+
]
117127
if args.verbose_build:
118128
helper_cmd.append('--verbose')
119129

0 commit comments

Comments
 (0)