diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/test/TestResult.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/test/TestResult.java | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/test/TestResult.java b/src/main/java/com/google/devtools/build/lib/analysis/test/TestResult.java index 39cbcdb363..b48649a16f 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/test/TestResult.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/test/TestResult.java @@ -15,10 +15,7 @@ package com.google.devtools.build.lib.analysis.test; import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; -import com.google.devtools.build.lib.analysis.test.TestRunnerAction.ResolvedPaths; -import com.google.devtools.build.lib.buildeventstream.TestFileNameConstants; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe; @@ -67,42 +64,6 @@ public class TestResult { return status == BlazeTestStatus.PASSED || status == BlazeTestStatus.FLAKY; } - public static ImmutableList<Pair<String, Path>> testOutputsFromPaths( - ResolvedPaths resolvedPaths) { - ImmutableList.Builder<Pair<String, Path>> builder = new ImmutableList.Builder<>(); - if (resolvedPaths.getXmlOutputPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.TEST_XML, resolvedPaths.getXmlOutputPath())); - } - if (resolvedPaths.getSplitLogsPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.SPLIT_LOGS, resolvedPaths.getSplitLogsPath())); - } - if (resolvedPaths.getTestWarningsPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.TEST_WARNINGS, - resolvedPaths.getTestWarningsPath())); - } - if (resolvedPaths.getUndeclaredOutputsZipPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.UNDECLARED_OUTPUTS_ZIP, - resolvedPaths.getUndeclaredOutputsZipPath())); - } - if (resolvedPaths.getUndeclaredOutputsManifestPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.UNDECLARED_OUTPUTS_MANIFEST, - resolvedPaths.getUndeclaredOutputsManifestPath())); - } - if (resolvedPaths.getUndeclaredOutputsAnnotationsPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.UNDECLARED_OUTPUTS_ANNOTATIONS, - resolvedPaths.getUndeclaredOutputsAnnotationsPath())); - } - if (resolvedPaths.getUnusedRunfilesLogPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.UNUSED_RUNFILES_LOG, - resolvedPaths.getUnusedRunfilesLogPath())); - } - if (resolvedPaths.getInfrastructureFailureFile().exists()) { - builder.add(Pair.of(TestFileNameConstants.TEST_INFRASTRUCTURE_FAILURE, - resolvedPaths.getInfrastructureFailureFile())); - } - return builder.build(); - } - /** * @return The test action. */ @@ -186,17 +147,6 @@ public class TestResult { * "test.log"). */ public Collection<Pair<String, Path>> getFiles() { - ImmutableList.Builder<Pair<String, Path>> builder = new ImmutableList.Builder<>(); - if (testAction.getTestLog().getPath().exists()) { - builder.add(Pair.of(TestFileNameConstants.TEST_LOG, testAction.getTestLog().getPath())); - } - if (testAction.getCoverageData() != null && testAction.getCoverageData().getPath().exists()) { - builder.add( - Pair.of(TestFileNameConstants.TEST_COVERAGE, testAction.getCoverageData().getPath())); - } - if (execRoot != null) { - builder.addAll(testOutputsFromPaths(testAction.resolve(execRoot))); - } - return builder.build(); + return testAction.getTestOutputsMapping(execRoot); } } |