Skip to content

Commit 5e7139e

Browse files
fmeumbrentleyjones
andauthored
Fix test exec platform constraints and transitions (#2736)
Co-authored-by: Brentley Jones <github@brentleyjones.com>
1 parent a4912c6 commit 5e7139e

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

apple/internal/rule_factory.bzl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ AppleTestRunnerInfo provider.
7777
providers = [AppleBundleInfo],
7878
),
7979
"_apple_coverage_support": attr.label(
80-
cfg = "exec",
80+
cfg = config.exec(exec_group = "test"),
8181
default = Label("@build_bazel_apple_support//tools:coverage_support"),
8282
),
8383
"_lcov_merger": attr.label(
8484
default = configuration_field(
8585
fragment = "coverage",
8686
name = "output_generator",
8787
),
88-
cfg = "exec",
88+
cfg = config.exec(exec_group = "test"),
8989
),
9090
"test_filter": attr.string(
9191
doc = """
@@ -180,9 +180,13 @@ def _create_apple_test_rule(*, doc, implementation, platform_type):
180180
*ide_visible_attrs
181181
),
182182
doc = doc,
183-
exec_compatible_with = [
184-
"@platforms//os:macos",
185-
],
183+
exec_groups = {
184+
"test": exec_group(
185+
exec_compatible_with = [
186+
"@platforms//os:macos",
187+
],
188+
),
189+
},
186190
test = True,
187191
)
188192

apple/internal/testing/build_test_rules.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ number (for example, `"9.0"`).
121121
),
122122
},
123123
doc = doc,
124-
exec_compatible_with = [
125-
"@platforms//os:macos",
126-
],
127124
implementation = _apple_build_test_rule_impl,
128125
test = True,
129126
cfg = transition_support.apple_rule_transition,

0 commit comments

Comments
 (0)