[Skymeld] Make skymeld include alias test.
Given 2 targets `//a:a` and `//a:a_alias`, we only know that one is an alias of
the other after the analysis phase (i.e. when we have the `ConfiguredTarget`
objects. In regular blaze, this information is then used to determine the test
type (parallel, exclusive, ...).
With Skymeld, we used to determine the test type before the analysis/execution
phase. This would result in `//a:a_alias` not being classified as a test.
This CL fixes that by moving the test classification to within
`BuildDriverFunction`, after analysis is done for a target.
PiperOrigin-RevId: 532769383
Change-Id: I1a4eb381fdf6abec2918a1e0e4e9f457ecb31470
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverKey.java b/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverKey.java
index 16beb59..6b534a3 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverKey.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/BuildDriverKey.java
@@ -27,7 +27,6 @@
public final class BuildDriverKey implements CPUHeavySkyKey {
private final ActionLookupKeyOrProxy actionLookupKey;
private final TopLevelArtifactContext topLevelArtifactContext;
- private final TestType testType;
private final boolean strictActionConflictCheck;
private final boolean explicitlyRequested;
private final boolean skipIncompatibleExplicitTargets;
@@ -42,8 +41,7 @@
boolean explicitlyRequested,
boolean skipIncompatibleExplicitTargets,
boolean extraActionTopLevelOnly,
- boolean isTopLevelAspectDriver,
- TestType testType) {
+ boolean isTopLevelAspectDriver) {
this.actionLookupKey = actionLookupKey;
this.topLevelArtifactContext = topLevelArtifactContext;
this.strictActionConflictCheck = strictActionConflictCheck;
@@ -51,7 +49,6 @@
this.skipIncompatibleExplicitTargets = skipIncompatibleExplicitTargets;
this.isTopLevelAspectDriver = isTopLevelAspectDriver;
this.extraActionTopLevelOnly = extraActionTopLevelOnly;
- this.testType = testType;
}
public static BuildDriverKey ofTopLevelAspect(
@@ -68,8 +65,7 @@
explicitlyRequested,
skipIncompatibleExplicitTargets,
extraActionTopLevelOnly,
- /* isTopLevelAspectDriver= */ true,
- TestType.NOT_TEST);
+ /* isTopLevelAspectDriver= */ true);
}
public static BuildDriverKey ofConfiguredTarget(
@@ -78,8 +74,7 @@
boolean strictActionConflictCheck,
boolean explicitlyRequested,
boolean skipIncompatibleExplicitTargets,
- boolean extraActionTopLevelOnly,
- TestType testType) {
+ boolean extraActionTopLevelOnly) {
return new BuildDriverKey(
actionLookupKey,
topLevelArtifactContext,
@@ -87,8 +82,7 @@
explicitlyRequested,
skipIncompatibleExplicitTargets,
extraActionTopLevelOnly,
- /* isTopLevelAspectDriver= */ false,
- testType);
+ /* isTopLevelAspectDriver= */ false);
}
public TopLevelArtifactContext getTopLevelArtifactContext() {
@@ -99,14 +93,6 @@
return actionLookupKey;
}
- public boolean isTest() {
- return !TestType.NOT_TEST.equals(testType);
- }
-
- public TestType getTestType() {
- return testType;
- }
-
public boolean strictActionConflictCheck() {
return strictActionConflictCheck;
}
@@ -138,7 +124,6 @@
BuildDriverKey otherBuildDriverKey = (BuildDriverKey) other;
return actionLookupKey.equals(otherBuildDriverKey.actionLookupKey)
&& topLevelArtifactContext.equals(otherBuildDriverKey.topLevelArtifactContext)
- && testType.equals(otherBuildDriverKey.testType)
&& strictActionConflictCheck == otherBuildDriverKey.strictActionConflictCheck
&& explicitlyRequested == otherBuildDriverKey.explicitlyRequested;
}
@@ -150,14 +135,13 @@
return Objects.hash(
actionLookupKey,
topLevelArtifactContext,
- testType,
strictActionConflictCheck,
explicitlyRequested);
}
@Override
- public final String toString() {
- return String.format("ActionLookupKey: %s; TestType: %s", actionLookupKey, testType);
+ public String toString() {
+ return String.format("ActionLookupKey: %s", actionLookupKey);
}
@Override