| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Set<String> outcome = testCase.info.multitestOutcome; | 340 Set<String> outcome = testCase.info.multitestOutcome; |
| 341 Expect.isNotNull(outcome); | 341 Expect.isNotNull(outcome); |
| 342 if ((outcome.isEmpty() || outcome.contains('compile-time error')) | 342 if (outcome.contains('compile-time error') && errors.length > 0) { |
| 343 && errors.length > 0) { | |
| 344 return true; | 343 return true; |
| 345 } else if (outcome.contains('static type warning') | 344 } else if (outcome.contains('static type warning') |
| 346 && staticWarnings.length > 0) { | 345 && staticWarnings.length > 0) { |
| 347 return true; | 346 return true; |
| 347 } else if (outcome.isEmpty() |
| 348 && (errors.length > 0 || staticWarnings.length > 0)) { |
| 349 return true; |
| 348 } | 350 } |
| 349 return false; | 351 return false; |
| 350 } | 352 } |
| 351 | 353 |
| 352 bool _didStandardTestFail(List errors, List staticWarnings) { | 354 bool _didStandardTestFail(List errors, List staticWarnings) { |
| 353 bool hasFatalTypeErrors = false; | 355 bool hasFatalTypeErrors = false; |
| 354 int numStaticTypeAnnotations = 0; | 356 int numStaticTypeAnnotations = 0; |
| 355 int numCompileTimeAnnotations = 0; | 357 int numCompileTimeAnnotations = 0; |
| 356 var isStaticClean = false; | 358 var isStaticClean = false; |
| 357 if (testCase.info != null) { | 359 if (testCase.info != null) { |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 // the developer doesn't waste his or her time trying to fix a bunch of | 1096 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1095 // tests that appear to be broken but were actually just flakes that | 1097 // tests that appear to be broken but were actually just flakes that |
| 1096 // didn't get retried because there had already been one failure. | 1098 // didn't get retried because there had already been one failure. |
| 1097 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1099 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1098 new RunningProcess(test, allowRetry, this).start(); | 1100 new RunningProcess(test, allowRetry, this).start(); |
| 1099 } | 1101 } |
| 1100 _numProcesses++; | 1102 _numProcesses++; |
| 1101 } | 1103 } |
| 1102 } | 1104 } |
| 1103 } | 1105 } |
| OLD | NEW |