| 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 void testComplete(int exitCode) { | 522 void testComplete(int exitCode) { |
| 523 new TestOutput.fromCase(testCase, exitCode, timedOut, stdout, | 523 new TestOutput.fromCase(testCase, exitCode, timedOut, stdout, |
| 524 stderr, new Date.now().difference(startTime)); | 524 stderr, new Date.now().difference(startTime)); |
| 525 timeoutTimer.cancel(); | 525 timeoutTimer.cancel(); |
| 526 if (testCase.output.unexpectedOutput && testCase.configuration['verbose']) { | 526 if (testCase.output.unexpectedOutput && testCase.configuration['verbose']) { |
| 527 print(testCase.displayName); | 527 print(testCase.displayName); |
| 528 for (var line in testCase.output.stderr) print(line); | 528 for (var line in testCase.output.stderr) print(line); |
| 529 for (var line in testCase.output.stdout) print(line); | 529 for (var line in testCase.output.stdout) print(line); |
| 530 } | 530 } |
| 531 if (allowRetries && testCase.usesWebDriver | 531 if (allowRetries && testCase.usesWebDriver |
| 532 && testCase.output.unexpectedOutput && testCase.numRetries > 0) { | 532 && testCase.output.unexpectedOutput |
| 533 && testCase.dynamic.numRetries > 0) { |
| 533 // Selenium tests can be flaky. Try rerunning. | 534 // Selenium tests can be flaky. Try rerunning. |
| 534 testCase.output.requestRetry = true; | 535 testCase.output.requestRetry = true; |
| 535 } | 536 } |
| 536 if (testCase.output.requestRetry) { | 537 if (testCase.output.requestRetry) { |
| 537 testCase.output.requestRetry = false; | 538 testCase.output.requestRetry = false; |
| 538 this.timedOut = false; | 539 this.timedOut = false; |
| 539 testCase.dynamic.numRetries--; | 540 testCase.dynamic.numRetries--; |
| 540 print("Potential flake. Re-running ${testCase.displayName} " + | 541 print("Potential flake. Re-running ${testCase.displayName} " + |
| 541 "(${testCase.dynamic.numRetries} attempt(s) remains)"); | 542 "(${testCase.dynamic.numRetries} attempt(s) remains)"); |
| 542 this.start(); | 543 this.start(); |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 // the developer doesn't waste his or her time trying to fix a bunch of | 1135 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1135 // tests that appear to be broken but were actually just flakes that | 1136 // tests that appear to be broken but were actually just flakes that |
| 1136 // didn't get retried because there had already been one failure. | 1137 // didn't get retried because there had already been one failure. |
| 1137 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1138 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1138 new RunningProcess(test, allowRetry, this).start(); | 1139 new RunningProcess(test, allowRetry, this).start(); |
| 1139 } | 1140 } |
| 1140 _numProcesses++; | 1141 _numProcesses++; |
| 1141 } | 1142 } |
| 1142 } | 1143 } |
| 1143 } | 1144 } |
| OLD | NEW |