Skip to content

Commit

Permalink
Apply exec transition to lcov_merger in sh_test and cc_test
Browse files Browse the repository at this point in the history
Fixes bazelbuild#17630

Closes bazelbuild#17631.

PiperOrigin-RevId: 513254952
Change-Id: Id97892db8adca0d8bbb5ecd87a44e3f711a5b56c
  • Loading branch information
thirtyseven authored and copybara-github committed Mar 1, 2023
1 parent 01c7d7d commit 37953c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env)
// to decorate data symbols imported from DLL.
.override(attr("linkstatic", BOOLEAN).value(OS.getCurrent() == OS.WINDOWS))
.override(attr("stamp", TRISTATE).value(TriState.NO))
.add(attr(":lcov_merger", LABEL).value(BaseRuleClasses.getCoverageOutputGeneratorLabel()))
.add(
attr(":lcov_merger", LABEL)
.cfg(ExecutionTransitionFactory.create())
.value(BaseRuleClasses.getCoverageOutputGeneratorLabel()))
.add(
attr("$collect_cc_coverage", LABEL)
.cfg(ExecutionTransitionFactory.create())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ public final class BazelShTestRule implements RuleDefinition {
public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment environment) {
// TODO(bazel-team): Add :lcov_merger to every test rule as opposed to particular rules.
builder
.add(attr(":lcov_merger", LABEL).value(BaseRuleClasses.getCoverageOutputGeneratorLabel()))
.add(
attr(":lcov_merger", LABEL)
.cfg(ExecutionTransitionFactory.create())
.value(BaseRuleClasses.getCoverageOutputGeneratorLabel()))
.add(
attr("$launcher", LABEL)
.cfg(ExecutionTransitionFactory.create())
Expand Down

0 comments on commit 37953c5

Please sign in to comment.