From 16427c9050db140d6cb90d7d6324d4a2ff1e249a Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 12 Jan 2023 01:23:49 -0800 Subject: [PATCH] Do not count tests as failed that have not started Before this commit, when the user interrupted a test run, tests that had not started until that point were counted as failed, whereas tests that were already running were counted as skipped. With this commmit, both types of tests are counted as skipped. Closes #17160. PiperOrigin-RevId: 501495265 Change-Id: I4dd157c32d70eb46a02070251684899b84c9802e --- .../devtools/build/lib/runtime/TerminalTestResultNotifier.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java b/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java index 33c83402ff6e0e..add22ee33df4f6 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/TerminalTestResultNotifier.java @@ -216,7 +216,8 @@ public void notify(Set summaries, int numberOfExecutedTargets) { for (TestSummary summary : summaries) { if (TestResult.isBlazeTestStatusPassed(summary.getStatus())) { stats.passCount++; - } else if (summary.getStatus() == BlazeTestStatus.NO_STATUS) { + } else if (summary.getStatus() == BlazeTestStatus.NO_STATUS + || summary.getStatus() == BlazeTestStatus.BLAZE_HALTED_BEFORE_TESTING) { stats.noStatusCount++; } else if (summary.getStatus() == BlazeTestStatus.FAILED_TO_BUILD) { stats.failedToBuildCount++;