| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 */ | 143 */ |
| 144 int numRetries; | 144 int numRetries; |
| 145 | 145 |
| 146 BrowserTestCase(displayName, commands, configuration, completedHandler, | 146 BrowserTestCase(displayName, commands, configuration, completedHandler, |
| 147 expectedOutcomes, [isNegative = false]) | 147 expectedOutcomes, [isNegative = false]) |
| 148 : super(displayName, commands, configuration, completedHandler, | 148 : super(displayName, commands, configuration, completedHandler, |
| 149 expectedOutcomes, isNegative) { | 149 expectedOutcomes, isNegative) { |
| 150 numRetries = 2; // Allow two retries to compensate for flaky browser tests. | 150 numRetries = 2; // Allow two retries to compensate for flaky browser tests. |
| 151 } | 151 } |
| 152 | 152 |
| 153 List<String> get _lastArguments() => command.last().arguments; | 153 List<String> get _lastArguments() => commands.last().arguments; |
| 154 | 154 |
| 155 List<String> get batchRunnerArguments() => [_lastArguments[0], '--batch']; | 155 List<String> get batchRunnerArguments() => [_lastArguments[0], '--batch']; |
| 156 | 156 |
| 157 List<String> get batchTestArguments() => | 157 List<String> get batchTestArguments() => |
| 158 _lastArguments.getRange(1, _lastArguments.length - 1); | 158 _lastArguments.getRange(1, _lastArguments.length - 1); |
| 159 } | 159 } |
| 160 | 160 |
| 161 | 161 |
| 162 /** | 162 /** |
| 163 * TestOutput records the output of a completed test: the process's exit code, | 163 * TestOutput records the output of a completed test: the process's exit code, |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 // the developer doesn't waste his or her time trying to fix a bunch of | 775 // the developer doesn't waste his or her time trying to fix a bunch of |
| 776 // tests that appear to be broken but were actually just flakes that | 776 // tests that appear to be broken but were actually just flakes that |
| 777 // didn't get retried because there had already been one failure. | 777 // didn't get retried because there had already been one failure. |
| 778 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 778 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 779 new RunningProcess(test, allowRetry, this).start(); | 779 new RunningProcess(test, allowRetry, this).start(); |
| 780 } | 780 } |
| 781 _numProcesses++; | 781 _numProcesses++; |
| 782 } | 782 } |
| 783 } | 783 } |
| 784 } | 784 } |
| OLD | NEW |