Skip to content

Commit

Permalink
Fix apple.swizzle_absolute_xcttestsourcelocation usage (#1457)
Browse files Browse the repository at this point in the history
Regressed in 43af381.

Signed-off-by: Brentley Jones <github@brentleyjones.com>
  • Loading branch information
brentleyjones authored Nov 22, 2024
1 parent be95b33 commit 26d4f8f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions swift/swift_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,6 @@ def _swift_test_impl(ctx):
discover_tests = ctx.attr.discover_tests
objc_test_discovery = swift_toolchain.test_configuration.objc_test_discovery

# `is_feature_enabled` isn't used, as it requires the prefix of the feature
# to start with `swift.`
swizzle_absolute_xcttestsourcelocation = (
"apple.swizzle_absolute_xcttestsourcelocation" in
feature_configuration._enabled_features
)

extra_link_deps = []
if swizzle_absolute_xcttestsourcelocation:
extra_link_deps.append(ctx.attr._swizzle_absolute_xcttestsourcelocation)

deps = list(ctx.attr.deps)
test_runner_deps = list(ctx.attr._test_runner_deps)

Expand All @@ -305,6 +294,17 @@ def _swift_test_impl(ctx):
else:
additional_link_deps = []

# `is_feature_enabled` isn't used, as it requires the prefix of the feature
# to start with `swift.`
swizzle_absolute_xcttestsourcelocation = (
"apple.swizzle_absolute_xcttestsourcelocation" in
feature_configuration._enabled_features
)
if swizzle_absolute_xcttestsourcelocation:
additional_link_deps.append(
ctx.attr._swizzle_absolute_xcttestsourcelocation,
)

# We also need to collect nested providers from `SwiftBinaryInfo` since we
# support testing those.
deps_cc_infos = []
Expand Down

0 comments on commit 26d4f8f

Please sign in to comment.