Skip to content

Commit 26d4f8f

Browse files
Fix apple.swizzle_absolute_xcttestsourcelocation usage (#1457)
Regressed in 43af381. Signed-off-by: Brentley Jones <github@brentleyjones.com>
1 parent be95b33 commit 26d4f8f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

swift/swift_test.bzl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,6 @@ def _swift_test_impl(ctx):
282282
discover_tests = ctx.attr.discover_tests
283283
objc_test_discovery = swift_toolchain.test_configuration.objc_test_discovery
284284

285-
# `is_feature_enabled` isn't used, as it requires the prefix of the feature
286-
# to start with `swift.`
287-
swizzle_absolute_xcttestsourcelocation = (
288-
"apple.swizzle_absolute_xcttestsourcelocation" in
289-
feature_configuration._enabled_features
290-
)
291-
292-
extra_link_deps = []
293-
if swizzle_absolute_xcttestsourcelocation:
294-
extra_link_deps.append(ctx.attr._swizzle_absolute_xcttestsourcelocation)
295-
296285
deps = list(ctx.attr.deps)
297286
test_runner_deps = list(ctx.attr._test_runner_deps)
298287

@@ -305,6 +294,17 @@ def _swift_test_impl(ctx):
305294
else:
306295
additional_link_deps = []
307296

297+
# `is_feature_enabled` isn't used, as it requires the prefix of the feature
298+
# to start with `swift.`
299+
swizzle_absolute_xcttestsourcelocation = (
300+
"apple.swizzle_absolute_xcttestsourcelocation" in
301+
feature_configuration._enabled_features
302+
)
303+
if swizzle_absolute_xcttestsourcelocation:
304+
additional_link_deps.append(
305+
ctx.attr._swizzle_absolute_xcttestsourcelocation,
306+
)
307+
308308
# We also need to collect nested providers from `SwiftBinaryInfo` since we
309309
# support testing those.
310310
deps_cc_infos = []

0 commit comments

Comments
 (0)