aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2016-06-29 10:53:11 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-06-29 13:00:12 +0200
commit3165c6cbdcfea6afc2c4b045d95bf9b872ee9d62 (patch)
tree1eedb98c23ef344e08535aff563423936ca8dd55 /src/main/java/com/google
parent068a661646660f8e1bd385ff4626d6d646812069 (diff)
experimental UI: on failing tests, don't state "completed sucessfully"
Currently, if a build completes with tests failing, the final status message is "INFO: Build completed successfully, xxx actions". While technically correct, it might mislead the user to believing all tests have passed (especially when only looking at the status in the terminal title). Therefore, if a build completes with failing tests, mention the number of failed tests in the final status message. -- Change-Id: I9234fbfdf2ad43dd29af660966dde73bf0c9311a Reviewed-on: https://bazel-review.googlesource.com/#/c/3918 MOS_MIGRATED_REVID=126176452
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java
index ceee32143c..a3f4bceecb 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/ExperimentalStateTracker.java
@@ -156,8 +156,16 @@ class ExperimentalStateTracker {
void buildComplete(BuildCompleteEvent event, String additionalInfo) {
if (event.getResult().getSuccess()) {
status = "INFO";
- additionalMessage =
- additionalInfo + "Build completed successfully, " + actionsCompleted + " total actions";
+ if (failedTests == 0) {
+ additionalMessage =
+ additionalInfo + "Build completed successfully, "
+ + actionsCompleted + " total action" + (actionsCompleted == 1 ? "" : "s");
+ } else {
+ additionalMessage =
+ additionalInfo + "Build completed, "
+ + failedTests + " test" + (failedTests == 1 ? "" : "s") + " FAILED, "
+ + actionsCompleted + " total action" + (actionsCompleted == 1 ? "" : "s");
+ }
} else {
ok = false;
status = "FAILED";