Skip to content

Commit

Permalink
Apply exec transition to lcov_merge in sh_test and cc_test (bazelbuil…
Browse files Browse the repository at this point in the history
…d#17632)

* Apply exec transition to lcov_merge in sh_test

* Apply exec transition to :lcov_merger in cc_test
  • Loading branch information
thirtyseven committed Mar 1, 2023
1 parent 1154a3f commit b396e2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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
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 b396e2a

Please sign in to comment.