Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 11364129: Added support for logging the output of failed flaky tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 isExpectedToBeFlaky() {
ricow1 2012/11/07 19:56:51 I would rename to flaky or isFlaky and I would con
kustermann 2012/11/08 09:15:13 Done.
172 if (expectedOutcomes.contains(SKIP)) {
173 return false;
174 }
175
176 var flags = new Set.from(expectedOutcomes);
177 flags.remove(TIMEOUT);
ricow1 2012/11/07 19:56:51 you can use cascades here if you like
kustermann 2012/11/08 09:15:13 Done.
178 flags.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
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 }
OLDNEW
« tools/testing/dart/test_progress.dart ('K') | « tools/testing/dart/test_progress.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698