| 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 break; | 833 break; |
| 834 } | 834 } |
| 835 } | 835 } |
| 836 } | 836 } |
| 837 numStaticTypeAnnotations = optionsFromFile['numStaticTypeAnnotations']; | 837 numStaticTypeAnnotations = optionsFromFile['numStaticTypeAnnotations']; |
| 838 numCompileTimeAnnotations = optionsFromFile['numCompileTimeAnnotations']; | 838 numCompileTimeAnnotations = optionsFromFile['numCompileTimeAnnotations']; |
| 839 isStaticClean = optionsFromFile['isStaticClean']; | 839 isStaticClean = optionsFromFile['isStaticClean']; |
| 840 } | 840 } |
| 841 | 841 |
| 842 if (errors.length == 0) { | 842 if (errors.length == 0) { |
| 843 if (!hasFatalTypeErrors && exitCode != 0) { | 843 if (!hasFatalTypeErrors && !(exitCode == 0 || exitCode == 1)) { |
| 844 diagnostics.add("EXIT CODE MISMATCH: Expected error message:"); | 844 diagnostics.add("EXIT CODE MISMATCH: Expected error message:"); |
| 845 diagnostics.add(" command[0]:${testCase.commands[0]}"); | 845 diagnostics.add(" command[0]:${testCase.commands[0]}"); |
| 846 diagnostics.add(" exitCode:${exitCode}"); | 846 diagnostics.add(" exitCode:${exitCode}"); |
| 847 return true; | 847 return true; |
| 848 } | 848 } |
| 849 } else if (exitCode == 0) { | 849 } else if (exitCode == 0 || exitCode == 1) { |
| 850 diagnostics.add("EXIT CODE MISMATCH: Unexpected error message:"); | 850 diagnostics.add("EXIT CODE MISMATCH: Unexpected error message:"); |
| 851 diagnostics.add(" errors[0]:${errors[0]}"); | 851 diagnostics.add(" errors[0]:${errors[0]}"); |
| 852 diagnostics.add(" command[0]:${testCase.commands[0]}"); | 852 diagnostics.add(" command[0]:${testCase.commands[0]}"); |
| 853 diagnostics.add(" exitCode:${exitCode}"); | 853 diagnostics.add(" exitCode:${exitCode}"); |
| 854 return true; | 854 return true; |
| 855 } | 855 } |
| 856 if (numStaticTypeAnnotations > 0 && isStaticClean) { | 856 if (numStaticTypeAnnotations > 0 && isStaticClean) { |
| 857 diagnostics.add("Cannot have both @static-clean and /// static " | 857 diagnostics.add("Cannot have both @static-clean and /// static " |
| 858 "type warning annotations."); | 858 "type warning annotations."); |
| 859 return true; | 859 return true; |
| (...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 // the developer doesn't waste his or her time trying to fix a bunch of | 1753 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1754 // tests that appear to be broken but were actually just flakes that | 1754 // tests that appear to be broken but were actually just flakes that |
| 1755 // didn't get retried because there had already been one failure. | 1755 // didn't get retried because there had already been one failure. |
| 1756 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1756 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1757 new RunningProcess(test, allowRetry, this).start(); | 1757 new RunningProcess(test, allowRetry, this).start(); |
| 1758 } | 1758 } |
| 1759 _numProcesses++; | 1759 _numProcesses++; |
| 1760 } | 1760 } |
| 1761 } | 1761 } |
| 1762 } | 1762 } |
| OLD | NEW |