| 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 /** | 542 /** |
| 543 * Called when all commands are executed. [exitCode] is 0 if all command | 543 * Called when all commands are executed. [exitCode] is 0 if all command |
| 544 * succeded, otherwise it will have the exit code of the first failing | 544 * succeded, otherwise it will have the exit code of the first failing |
| 545 * command. | 545 * command. |
| 546 */ | 546 */ |
| 547 void testComplete(int exitCode) { | 547 void testComplete(int exitCode) { |
| 548 new TestOutput.fromCase(testCase, exitCode, timedOut, stdout, | 548 new TestOutput.fromCase(testCase, exitCode, timedOut, stdout, |
| 549 stderr, new Date.now().difference(startTime)); | 549 stderr, new Date.now().difference(startTime)); |
| 550 timeoutTimer.cancel(); | 550 timeoutTimer.cancel(); |
| 551 if (testCase.output.unexpectedOutput && processQueue._verbose) { | 551 if (testCase.output.unexpectedOutput |
| 552 && testCase.configuration['verbose'] != null |
| 553 && testCase.configuration['verbose']) { |
| 552 print(testCase.displayName); | 554 print(testCase.displayName); |
| 553 for (var line in testCase.output.stderr) print(line); | 555 for (var line in testCase.output.stderr) print(line); |
| 554 for (var line in testCase.output.stdout) print(line); | 556 for (var line in testCase.output.stdout) print(line); |
| 555 } | 557 } |
| 556 if (allowRetries && testCase.usesWebDriver | 558 if (allowRetries && testCase.usesWebDriver |
| 557 && testCase.output.unexpectedOutput | 559 && testCase.output.unexpectedOutput |
| 558 && testCase.dynamic.numRetries > 0) { | 560 && testCase.dynamic.numRetries > 0) { |
| 559 // Selenium tests can be flaky. Try rerunning. | 561 // Selenium tests can be flaky. Try rerunning. |
| 560 testCase.output.requestRetry = true; | 562 testCase.output.requestRetry = true; |
| 561 } | 563 } |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 // the developer doesn't waste his or her time trying to fix a bunch of | 1162 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1161 // tests that appear to be broken but were actually just flakes that | 1163 // tests that appear to be broken but were actually just flakes that |
| 1162 // didn't get retried because there had already been one failure. | 1164 // didn't get retried because there had already been one failure. |
| 1163 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1165 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1164 new RunningProcess(test, allowRetry, this).start(); | 1166 new RunningProcess(test, allowRetry, this).start(); |
| 1165 } | 1167 } |
| 1166 _numProcesses++; | 1168 _numProcesses++; |
| 1167 } | 1169 } |
| 1168 } | 1170 } |
| 1169 } | 1171 } |
| OLD | NEW |