aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2018-08-02 11:20:57 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-02 11:22:29 -0700
commit215286bb80901a40fa81c4f2bd4577b3bedc9095 (patch)
tree51418f69a13561ca8edb07783055e7a3ad52c44e /src/main/java/com/google/devtools/build/lib/analysis
parent272c93ce4faece38e7f95508393d1dc15bf4b031 (diff)
Make TestSummary event paths use the file system from ActionExecutionContext.
RELNOTES: None PiperOrigin-RevId: 207133488
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/test/TestResult.java9
1 files changed, 8 insertions, 1 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 c6a46e0b4e..14543815e2 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
@@ -24,6 +24,7 @@ import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.concurrent.ThreadSafety.ThreadSafe;
import com.google.devtools.build.lib.exec.TestAttempt;
import com.google.devtools.build.lib.util.Pair;
+import com.google.devtools.build.lib.vfs.FileSystem;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.view.test.TestStatus.BlazeTestStatus;
import com.google.devtools.build.lib.view.test.TestStatus.TestResultData;
@@ -82,7 +83,13 @@ public class TestResult {
* you need log location.
*/
public Path getTestLogPath() {
- return testAction.getTestLog().getPath();
+ Path testLogPath = testAction.getTestLog().getPath();
+ // If we have an exec root we'll use its fileSystem
+ if (execRoot != null) {
+ FileSystem fileSystem = execRoot.getFileSystem();
+ return fileSystem.getPath(testLogPath.getPathString());
+ }
+ return testLogPath;
}
/**