aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
diff options
context:
space:
mode:
authorGravatar philwo <philwo@google.com>2017-04-24 15:22:29 +0200
committerGravatar Vladimir Moskva <vladmos@google.com>2017-04-24 16:52:22 +0200
commit29aee67c0c95af2840faa47a071b72adf4b734ce (patch)
tree5742d1b9d4ef0cce8e9815aede5be2700e8c992d /src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
parentf3fd3a4ad2e7f2878e7d8f71cfb4cb53fc15e04e (diff)
Bazel: Fix wrong test count shown for failing tests.
Bazel always miscounted the number of passes that a test was run, resulting in confusing output like this: philwo@philwo:~/src/errortest$ bazel test //tests:fail [...] //tests:fail FAILED in 1 out of 2 in 0.1s ERROR .tests/fail It shows "1 out of 2" even though just one pass happened. With this fix, the output is correct: philwo@philwo:~/src/errortest$ bazel test //tests:fail [...] //tests:fail FAILED in 0.1s ERROR .tests/fail Relevant to #2855. PiperOrigin-RevId: 154043240
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
index 7675da16eb..f63d5196fb 100644
--- a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java
@@ -244,7 +244,7 @@ public class StandaloneTestStrategy extends TestStrategy {
for (int i = 0; i < data.getFailedLogsCount(); i++) {
dataBuilder.addFailedLogs(data.getFailedLogs(i));
}
- if (data.hasTestPassed()) {
+ if (data.getTestPassed()) {
dataBuilder.setPassedLog(data.getPassedLog());
}
dataBuilder.addTestTimes(data.getTestTimes(0));