aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java b/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java
index 1daec5e5cc..dd7e79d197 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/TestResultAnalyzer.java
@@ -17,6 +17,7 @@ import com.google.common.collect.Sets;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import com.google.devtools.build.lib.actions.Artifact;
+import com.google.devtools.build.lib.analysis.AliasProvider;
import com.google.devtools.build.lib.analysis.ConfiguredTarget;
import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.analysis.test.TestProvider;
@@ -143,7 +144,7 @@ public class TestResultAnalyzer {
// If already reported by the listener, no work remains for this target.
TestSummary.Builder summary = listener.getCurrentSummary(testTarget);
- Label testLabel = testTarget.getLabel();
+ Label testLabel = AliasProvider.getDependencyLabel(testTarget);
Preconditions.checkNotNull(summary,
"%s did not complete test filtering, but has a test result", testLabel);
if (listener.targetReported(testTarget)) {
@@ -200,10 +201,6 @@ public class TestResultAnalyzer {
Preconditions.checkNotNull(summaryBuilder);
TestSummary existingSummary = Preconditions.checkNotNull(summaryBuilder.peek());
- TransitiveInfoCollection target = existingSummary.getTarget();
- Preconditions.checkNotNull(
- target, "The existing TestSummary must be associated with a target");
-
BlazeTestStatus status = existingSummary.getStatus();
int numCached = existingSummary.numCached();
int numLocalActionCached = existingSummary.numLocalActionCached();
@@ -224,6 +221,9 @@ public class TestResultAnalyzer {
summaryBuilder.addCoverageFiles(Collections.singletonList(coverageData));
}
+ TransitiveInfoCollection target = existingSummary.getTarget();
+ Preconditions.checkNotNull(target, "The existing TestSummary must be associated with a target");
+
if (!executionOptions.runsPerTestDetectsFlakes) {
status = aggregateStatus(status, result.getData().getStatus());
} else {
@@ -342,7 +342,7 @@ public class TestResultAnalyzer {
StringBuilder builder = new StringBuilder(String.format(
"%s: Test execution time (%.1fs excluding execution overhead) outside of "
+ "range for %s tests. Consider setting timeout=\"%s\"",
- target.getLabel(),
+ AliasProvider.getDependencyLabel(target),
maxTimeOfShard / 1000.0,
specifiedTimeout.prettyPrint(),
expectedTimeout));