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

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

Issue 9424008: Make "should retry" argument optional -- RunningProcess is used by separate VM (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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 */ 243 */
244 class RunningProcess { 244 class RunningProcess {
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; 253 bool allowRetries = false;
254 254
255 RunningProcess(TestCase this.testCase, this.allowRetries); 255 RunningProcess(TestCase this.testCase, [this.allowRetries]);
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);
(...skipping 450 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 716 // 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 717 // tests that appear to be broken but were actually just flakes that
718 // didn't get retried because there had already been one failure. 718 // didn't get retried because there had already been one failure.
719 new RunningProcess(test, 719 new RunningProcess(test,
720 _MAX_FAILED_NO_RETRY > _progress.numFailedTests).start(); 720 _MAX_FAILED_NO_RETRY > _progress.numFailedTests).start();
721 } 721 }
722 _numProcesses++; 722 _numProcesses++;
723 } 723 }
724 } 724 }
725 } 725 }
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