| 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // OK to Skip error output that doesn't match the machine format | 330 // OK to Skip error output that doesn't match the machine format |
| 331 } | 331 } |
| 332 if (testCase.info != null | 332 if (testCase.info != null |
| 333 && testCase.info.optionsFromFile['isMultitest']) { | 333 && testCase.info.optionsFromFile['isMultitest']) { |
| 334 return _didMultitestFail(errors, staticWarnings); | 334 return _didMultitestFail(errors, staticWarnings); |
| 335 } | 335 } |
| 336 return _didStandardTestFail(errors, staticWarnings); | 336 return _didStandardTestFail(errors, staticWarnings); |
| 337 } | 337 } |
| 338 | 338 |
| 339 bool _didMultitestFail(List errors, List staticWarnings) { | 339 bool _didMultitestFail(List errors, List staticWarnings) { |
| 340 String outcome = testCase.info.multitestOutcome; | 340 Set<String> outcome = testCase.info.multitestOutcome; |
| 341 if ((outcome == '' || outcome == 'compile-time error') && errors.length > 0)
{ | 341 Expect.isNotNull(outcome); |
| 342 if ((outcome.isEmpty() || outcome.contains('compile-time error')) |
| 343 && errors.length > 0) { |
| 342 return true; | 344 return true; |
| 343 } else if (outcome == 'static type error' && staticWarnings.length > 0) { | 345 } else if (outcome.contains('static type error') |
| 346 && staticWarnings.length > 0) { |
| 344 return true; | 347 return true; |
| 345 } | 348 } |
| 346 return false; | 349 return false; |
| 347 } | 350 } |
| 348 | 351 |
| 349 bool _didStandardTestFail(List errors, List staticWarnings) { | 352 bool _didStandardTestFail(List errors, List staticWarnings) { |
| 350 bool hasFatalTypeErrors = false; | 353 bool hasFatalTypeErrors = false; |
| 351 int numStaticTypeAnnotations = 0; | 354 int numStaticTypeAnnotations = 0; |
| 352 int numCompileTimeAnnotations = 0; | 355 int numCompileTimeAnnotations = 0; |
| 353 var isStaticClean = false; | 356 var isStaticClean = false; |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 // the developer doesn't waste his or her time trying to fix a bunch of | 1131 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1129 // tests that appear to be broken but were actually just flakes that | 1132 // tests that appear to be broken but were actually just flakes that |
| 1130 // didn't get retried because there had already been one failure. | 1133 // didn't get retried because there had already been one failure. |
| 1131 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1134 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1132 new RunningProcess(test, allowRetry, this).start(); | 1135 new RunningProcess(test, allowRetry, this).start(); |
| 1133 } | 1136 } |
| 1134 _numProcesses++; | 1137 _numProcesses++; |
| 1135 } | 1138 } |
| 1136 } | 1139 } |
| 1137 } | 1140 } |
| OLD | NEW |