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

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

Issue 9422011: Third time's the charm... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 Process process; 245 Process process;
246 TestCase testCase; 246 TestCase testCase;
247 bool timedOut = false; 247 bool timedOut = false;
248 Date startTime; 248 Date startTime;
249 Timer timeoutTimer; 249 Timer timeoutTimer;
250 List<String> stdout; 250 List<String> stdout;
251 List<String> stderr; 251 List<String> stderr;
252 List<Function> handlers; 252 List<Function> handlers;
253 bool allowRetries = false; 253 bool allowRetries = false;
254 254
255 RunningProcess(TestCase this.testCase, [this.allowRetries]); 255 RunningProcess(TestCase this.testCase, [this.allowRetries]);
Siggi Cherem (dart-lang) 2012/02/17 22:04:13 The alternative is to do it here: RunningProcess(
256 256
257 void exitHandler(int exitCode) { 257 void exitHandler(int exitCode) {
258 new TestOutput(testCase, exitCode, timedOut, stdout, 258 new TestOutput(testCase, exitCode, timedOut, stdout,
259 stderr, new Date.now().difference(startTime)); 259 stderr, new Date.now().difference(startTime));
260 process.close(); 260 process.close();
261 timeoutTimer.cancel(); 261 timeoutTimer.cancel();
262 if (testCase.output.unexpectedOutput && testCase.configuration['verbose']) { 262 if (testCase.output.unexpectedOutput && testCase.configuration['verbose']) {
263 print(testCase.displayName); 263 print(testCase.displayName);
264 for (var line in testCase.output.stderr) print(line); 264 for (var line in testCase.output.stderr) print(line);
265 for (var line in testCase.output.stdout) print(line); 265 for (var line in testCase.output.stdout) print(line);
266 } 266 }
267 if (allowRetries && testCase.configuration['component'] == 'webdriver' && 267 if (allowRetries != null && allowRetries
268 && testCase.configuration['component'] == 'webdriver' &&
268 testCase.output.unexpectedOutput && testCase.numRetries > 0) { 269 testCase.output.unexpectedOutput && testCase.numRetries > 0) {
269 // Selenium tests can be flaky. Try rerunning. 270 // Selenium tests can be flaky. Try rerunning.
270 testCase.output.requestRetry = true; 271 testCase.output.requestRetry = true;
271 } 272 }
272 if (testCase.output.requestRetry) { 273 if (testCase.output.requestRetry) {
273 testCase.output.requestRetry = false; 274 testCase.output.requestRetry = false;
274 this.timedOut = false; 275 this.timedOut = false;
275 testCase.dynamic.numRetries--; 276 testCase.dynamic.numRetries--;
276 print("Potential flake. Re-running " + testCase.displayName); 277 print("Potential flake. Re-running " + testCase.displayName);
277 this.start(); 278 this.start();
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 // the developer doesn't waste his or her time trying to fix a bunch of 717 // the developer doesn't waste his or her time trying to fix a bunch of
717 // tests that appear to be broken but were actually just flakes that 718 // tests that appear to be broken but were actually just flakes that
718 // didn't get retried because there had already been one failure. 719 // didn't get retried because there had already been one failure.
719 new RunningProcess(test, 720 new RunningProcess(test,
720 _MAX_FAILED_NO_RETRY > _progress.numFailedTests).start(); 721 _MAX_FAILED_NO_RETRY > _progress.numFailedTests).start();
721 } 722 }
722 _numProcesses++; 723 _numProcesses++;
723 } 724 }
724 } 725 }
725 } 726 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698