Index: tools/testing/dart/test_runner.dart |
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart |
index a3e72c9712e24773ba8dad225a2e838761785d58..f3d62769d5ff1e93aba19488f4e276cf2e6b755f 100644 |
--- a/tools/testing/dart/test_runner.dart |
+++ b/tools/testing/dart/test_runner.dart |
@@ -840,13 +840,13 @@ class AnalysisCommandOutputImpl extends CommandOutputImpl { |
} |
if (errors.length == 0) { |
- if (!hasFatalTypeErrors && exitCode != 0) { |
+ if (!hasFatalTypeErrors && !(exitCode == 0 || exitCode == 1)) { |
diagnostics.add("EXIT CODE MISMATCH: Expected error message:"); |
diagnostics.add(" command[0]:${testCase.commands[0]}"); |
diagnostics.add(" exitCode:${exitCode}"); |
return true; |
} |
- } else if (exitCode == 0) { |
+ } else if (exitCode == 0 || exitCode == 1) { |
diagnostics.add("EXIT CODE MISMATCH: Unexpected error message:"); |
diagnostics.add(" errors[0]:${errors[0]}"); |
diagnostics.add(" command[0]:${testCase.commands[0]}"); |