Chromium Code Reviews| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 final checked = configuration['checked'] ? '-checked' : ''; | 160 final checked = configuration['checked'] ? '-checked' : ''; |
| 161 return "$compiler-$runtime$checked ${mode}_$arch"; | 161 return "$compiler-$runtime$checked ${mode}_$arch"; |
| 162 } | 162 } |
| 163 | 163 |
| 164 List<String> get batchRunnerArguments => ['-batch']; | 164 List<String> get batchRunnerArguments => ['-batch']; |
| 165 List<String> get batchTestArguments => commands.last.arguments; | 165 List<String> get batchTestArguments => commands.last.arguments; |
| 166 | 166 |
| 167 bool get usesWebDriver => TestUtils.usesWebDriver(configuration['runtime']); | 167 bool get usesWebDriver => TestUtils.usesWebDriver(configuration['runtime']); |
| 168 | 168 |
| 169 void completed() { completedHandler(this); } | 169 void completed() { completedHandler(this); } |
| 170 | |
| 171 bool get isFlaky { | |
| 172 if (expectedOutcomes.contains(SKIP)) { | |
|
ahe
2012/11/09 10:35:02
Weird indentation.
| |
| 173 return false; | |
| 174 } | |
| 175 | |
| 176 var flags = new Set.from(expectedOutcomes); | |
| 177 flags..remove(TIMEOUT) | |
| 178 ..remove(SLOW); | |
| 179 return flags.contains(PASS) && flags.length > 1; | |
| 180 } | |
| 170 } | 181 } |
| 171 | 182 |
| 172 | 183 |
| 173 /** | 184 /** |
| 174 * BrowserTestCase has an extra compilation command that is run in a separate | 185 * BrowserTestCase has an extra compilation command that is run in a separate |
| 175 * process, before the regular test is run as in the base class [TestCase]. | 186 * process, before the regular test is run as in the base class [TestCase]. |
| 176 * If the compilation command fails, then the rest of the test is not run. | 187 * If the compilation command fails, then the rest of the test is not run. |
| 177 */ | 188 */ |
| 178 class BrowserTestCase extends TestCase { | 189 class BrowserTestCase extends TestCase { |
| 179 /** | 190 /** |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1283 // the developer doesn't waste his or her time trying to fix a bunch of | 1294 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1284 // tests that appear to be broken but were actually just flakes that | 1295 // tests that appear to be broken but were actually just flakes that |
| 1285 // didn't get retried because there had already been one failure. | 1296 // didn't get retried because there had already been one failure. |
| 1286 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1297 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1287 new RunningProcess(test, allowRetry, this).start(); | 1298 new RunningProcess(test, allowRetry, this).start(); |
| 1288 } | 1299 } |
| 1289 _numProcesses++; | 1300 _numProcesses++; |
| 1290 } | 1301 } |
| 1291 } | 1302 } |
| 1292 } | 1303 } |
| OLD | NEW |