diff options
author | 2015-12-02 16:15:03 +0000 | |
---|---|---|
committer | 2015-12-02 22:26:49 +0000 | |
commit | 01a10d45737d5ddaccb4bea49829442d8f230b2c (patch) | |
tree | 249a6a5ca76dfa88f06fedfa67d1abc8c93e8795 /src | |
parent | a165f24c47b6ee2338d9dec6b73c1486ade20eca (diff) |
Add the log to the test result, both passed or failed cases.
This is necessary for Bazel to print the path to the log as part of the
test summary at the end of a build.
--
MOS_MIGRATED_REVID=109199512
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/test/StandaloneTestStrategy.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/test/StandaloneTestStrategy.java b/src/main/java/com/google/devtools/build/lib/rules/test/StandaloneTestStrategy.java index ab8dced2a8..5d7739f664 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/test/StandaloneTestStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/rules/test/StandaloneTestStrategy.java @@ -190,7 +190,8 @@ public class StandaloneTestStrategy extends TestStrategy { builder.setTestPassed(true) .setStatus(BlazeTestStatus.PASSED) - .setCachable(true); + .setCachable(true) + .setPassedLog(testLogPath.getPathString()); } catch (ExecException e) { // Execution failed, which we consider a test failure. @@ -198,7 +199,8 @@ public class StandaloneTestStrategy extends TestStrategy { // timeout, etc.) builder .setTestPassed(false) - .setStatus(e.hasTimedOut() ? BlazeTestStatus.TIMEOUT : BlazeTestStatus.FAILED); + .setStatus(e.hasTimedOut() ? BlazeTestStatus.TIMEOUT : BlazeTestStatus.FAILED) + .addFailedLogs(testLogPath.getPathString()); } finally { long duration = executor.getClock().currentTimeMillis() - startTime; builder.addTestTimes(duration); |