| 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 } else if (exitCode != 0) { | 557 } else if (exitCode != 0) { |
| 558 stderr.add('test.dart: Compilation failed$suffix, exit code $exitCode\n'); | 558 stderr.add('test.dart: Compilation failed$suffix, exit code $exitCode\n'); |
| 559 testComplete(exitCode); | 559 testComplete(exitCode); |
| 560 } else { | 560 } else { |
| 561 stderr.add('test.dart: Compilation finished $suffix\n'); | 561 stderr.add('test.dart: Compilation finished $suffix\n'); |
| 562 stdout.add('test.dart: Compilation finished $suffix\n'); | 562 stdout.add('test.dart: Compilation finished $suffix\n'); |
| 563 if (currentStep == totalSteps - 1 && testCase.usesWebDriver && | 563 if (currentStep == totalSteps - 1 && testCase.usesWebDriver && |
| 564 !testCase.configuration['noBatch']) { | 564 !testCase.configuration['noBatch']) { |
| 565 // Note: processQueue will always be non-null for runtime == ie, ff, | 565 // Note: processQueue will always be non-null for runtime == ie, ff, |
| 566 // safari, chrome, opera. (It is only null for runtime == vm) | 566 // safari, chrome, opera. (It is only null for runtime == vm) |
| 567 // This RunningProcess object is done, and hands over control to |
| 568 // BatchRunner.startTest(), which handles reporting, etc. |
| 569 timeoutTimer.cancel(); |
| 567 processQueue._getBatchRunner(testCase).startTest(testCase); | 570 processQueue._getBatchRunner(testCase).startTest(testCase); |
| 568 } else { | 571 } else { |
| 569 runCommand(testCase.commands[currentStep++], stepExitHandler); | 572 runCommand(testCase.commands[currentStep++], stepExitHandler); |
| 570 } | 573 } |
| 571 } | 574 } |
| 572 } | 575 } |
| 573 | 576 |
| 574 Function makeReadHandler(StringInputStream source, List<String> destination) { | 577 Function makeReadHandler(StringInputStream source, List<String> destination) { |
| 575 return () { | 578 return () { |
| 576 if (source.closed) return; // TODO(whesse): Remove when bug is fixed. | 579 if (source.closed) return; // TODO(whesse): Remove when bug is fixed. |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 // the developer doesn't waste his or her time trying to fix a bunch of | 1159 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1157 // tests that appear to be broken but were actually just flakes that | 1160 // tests that appear to be broken but were actually just flakes that |
| 1158 // didn't get retried because there had already been one failure. | 1161 // didn't get retried because there had already been one failure. |
| 1159 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1162 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1160 new RunningProcess(test, allowRetry, this).start(); | 1163 new RunningProcess(test, allowRetry, this).start(); |
| 1161 } | 1164 } |
| 1162 _numProcesses++; | 1165 _numProcesses++; |
| 1163 } | 1166 } |
| 1164 } | 1167 } |
| 1165 } | 1168 } |
| OLD | NEW |