From cb6e5c24b82e0e20a243145fb6ea32b09e3d1de3 Mon Sep 17 00:00:00 2001 From: Philipp Wollermann Date: Thu, 20 May 2021 12:03:40 +0200 Subject: [PATCH] Revert "Allow exec groups to inherit from the rule or other exec groups." This reverts commit 3486b783735531f4edf265babdc40a8730cc427b. Signed-off-by: Philipp Wollermann --- .../devtools/build/lib/analysis/BaseRuleClasses.java | 3 --- .../build/lib/analysis/test/TestActionBuilder.java | 9 +-------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java b/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java index 22fe779a9a5bdb..2268936e817988 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/BaseRuleClasses.java @@ -148,8 +148,6 @@ public static LabelLateBoundDefault getCoverageOutputGenerat return runUnder != null ? runUnder.getLabel() : null; }); - public static final String TEST_RUNNER_EXEC_GROUP = "test"; - /** * A base rule for all test rules. */ @@ -157,7 +155,6 @@ public static final class TestBaseRule implements RuleDefinition { @Override public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) { return builder - .addExecGroup(TEST_RUNNER_EXEC_GROUP) .requiresConfigurationFragments(TestConfiguration.class) // TestConfiguration only needed to create TestAction and TestProvider // Only necessary at top-level and can be skipped if trimmed. diff --git a/src/main/java/com/google/devtools/build/lib/analysis/test/TestActionBuilder.java b/src/main/java/com/google/devtools/build/lib/analysis/test/TestActionBuilder.java index c4a6b58fff08b0..b0707937d8b4b6 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/test/TestActionBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/test/TestActionBuilder.java @@ -14,14 +14,12 @@ package com.google.devtools.build.lib.analysis.test; -import static com.google.devtools.build.lib.analysis.BaseRuleClasses.TEST_RUNNER_EXEC_GROUP; import static com.google.devtools.build.lib.packages.BuildType.LABEL; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.devtools.build.lib.actions.ActionInput; -import com.google.devtools.build.lib.actions.ActionOwner; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.ArtifactRoot; import com.google.devtools.build.lib.actions.RunfilesSupplier; @@ -148,11 +146,6 @@ private boolean isPersistentTestRunner() { && persistentTestRunnerRunfiles != null; } - private ActionOwner getOwner() { - ActionOwner owner = ruleContext.getActionOwner(TEST_RUNNER_EXEC_GROUP); - return owner == null ? ruleContext.getActionOwner() : owner; - } - /** * Creates a test action and artifacts for the given rule. The test action will use the specified * executable and runfiles. @@ -391,7 +384,7 @@ private TestParams createTestAction(int shards) throws InterruptedException { boolean splitCoveragePostProcessing = testConfiguration.splitCoveragePostProcessing(); TestRunnerAction testRunnerAction = new TestRunnerAction( - getOwner(), + ruleContext.getActionOwner(), inputs, testRunfilesSupplier, testActionExecutable,