Don't report targets as broken when they were actually skipped because of  no[test_]keep_going.

--
MOS_MIGRATED_REVID=115506435
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/BuildResult.java b/src/main/java/com/google/devtools/build/lib/buildtool/BuildResult.java
index e57b679..7ae2da9 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/BuildResult.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/BuildResult.java
@@ -35,6 +35,7 @@
 
   private Throwable crash = null;
   private boolean catastrophe = false;
+  private boolean stopOnFirstFailure;
   private ExitCode exitCondition = ExitCode.BLAZE_INTERNAL_ERROR;
 
   private BuildConfigurationCollection configurations;
@@ -115,6 +116,21 @@
   }
 
   /**
+   * Whether some targets were skipped because of {@code setStopOnFirstFailure}.
+   */
+  public boolean skippedTargetsBecauseOfEarlierFailure() {
+    return stopOnFirstFailure && !getSuccess();
+  }
+
+  /**
+   * Indicates that remaining targets should be skipped once a target breaks/fails.
+   * This will be set when --nokeep_going or --notest_keep_going is set.
+   */
+  public void setStopOnFirstFailure(boolean stopOnFirstFailure) {
+    this.stopOnFirstFailure = stopOnFirstFailure;
+  }
+
+  /**
    * Gets the Blaze crash Throwable. Null if Blaze did not crash.
    */
   public Throwable getUnhandledThrowable() {