| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Classes and methods for executing tests. | 6 * Classes and methods for executing tests. |
| 7 * | 7 * |
| 8 * This module includes: | 8 * This module includes: |
| 9 * - Managing parallel execution of tests, including timeout checks. | 9 * - Managing parallel execution of tests, including timeout checks. |
| 10 * - Evaluating the output of each test as pass/fail/crash/timeout. | 10 * - Evaluating the output of each test as pass/fail/crash/timeout. |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 break; | 958 break; |
| 959 } | 959 } |
| 960 } | 960 } |
| 961 } | 961 } |
| 962 numStaticTypeAnnotations = optionsFromFile['numStaticTypeAnnotations']; | 962 numStaticTypeAnnotations = optionsFromFile['numStaticTypeAnnotations']; |
| 963 numCompileTimeAnnotations = optionsFromFile['numCompileTimeAnnotations']; | 963 numCompileTimeAnnotations = optionsFromFile['numCompileTimeAnnotations']; |
| 964 isStaticClean = optionsFromFile['isStaticClean']; | 964 isStaticClean = optionsFromFile['isStaticClean']; |
| 965 } | 965 } |
| 966 | 966 |
| 967 if (errors.length == 0) { | 967 if (errors.length == 0) { |
| 968 if (!hasFatalTypeErrors && exitCode != 0) { | 968 // If the analyzer has warnings it will exit 1. |
| 969 // We should reconsider how we do this once we have landed a dart |
| 970 // only version of the analyzer for stable use (as in not run in batch |
| 971 // mode). |
| 972 if (!hasFatalTypeErrors && exitCode != 0 && staticWarnings.length == 0) { |
| 969 diagnostics.add("EXIT CODE MISMATCH: Expected error message:"); | 973 diagnostics.add("EXIT CODE MISMATCH: Expected error message:"); |
| 970 diagnostics.add(" command[0]:${testCase.commands[0]}"); | 974 diagnostics.add(" command[0]:${testCase.commands[0]}"); |
| 971 diagnostics.add(" exitCode:${exitCode}"); | 975 diagnostics.add(" exitCode:${exitCode}"); |
| 972 return true; | 976 return true; |
| 973 } | 977 } |
| 974 } else if (exitCode == 0) { | 978 } else if (exitCode == 0) { |
| 975 diagnostics.add("EXIT CODE MISMATCH: Unexpected error message:"); | 979 diagnostics.add("EXIT CODE MISMATCH: Unexpected error message:"); |
| 976 diagnostics.add(" errors[0]:${errors[0]}"); | 980 diagnostics.add(" errors[0]:${errors[0]}"); |
| 977 diagnostics.add(" command[0]:${testCase.commands[0]}"); | 981 diagnostics.add(" command[0]:${testCase.commands[0]}"); |
| 978 diagnostics.add(" exitCode:${exitCode}"); | 982 diagnostics.add(" exitCode:${exitCode}"); |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 } | 2071 } |
| 2068 } | 2072 } |
| 2069 | 2073 |
| 2070 void eventAllTestsDone() { | 2074 void eventAllTestsDone() { |
| 2071 for (var listener in _eventListener) { | 2075 for (var listener in _eventListener) { |
| 2072 listener.allDone(); | 2076 listener.allDone(); |
| 2073 } | 2077 } |
| 2074 _allDone(); | 2078 _allDone(); |
| 2075 } | 2079 } |
| 2076 } | 2080 } |
| OLD | NEW |