From c29348997ecf41405403c4058af702901072c0a6 Mon Sep 17 00:00:00 2001 From: Ted Kaplan Date: Fri, 24 Feb 2023 10:48:00 -0800 Subject: [PATCH] Add host transition to Java version of py_test --- .../build/lib/bazel/rules/python/BazelPyTestRule.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java index a58c8eef1416bc..0ebab840205e60 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPyTestRule.java @@ -57,7 +57,10 @@ public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) attr("$launcher", LABEL) .cfg(ExecutionTransitionFactory.create()) .value(env.getToolsLabel("//tools/launcher:launcher"))) - .add(attr(":lcov_merger", LABEL).value(BaseRuleClasses.getCoverageOutputGeneratorLabel())) + .add( + attr(":lcov_merger", LABEL) + .cfg(ExecutionTransitionFactory.create()) + .value(BaseRuleClasses.getCoverageOutputGeneratorLabel())) // Add the script as an attribute in order for py_test to output code coverage results for // code covered by CC binaries invocations. .add(