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

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

Issue 8949034: Fix test.dart by not closing processes twice. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library("test_runner"); 5 #library("test_runner");
6 6
7 #import("status_file_parser.dart"); 7 #import("status_file_parser.dart");
8 #import("test_progress.dart"); 8 #import("test_progress.dart");
9 #import("test_suite.dart"); 9 #import("test_suite.dart");
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 void exitHandler(int exitCode) { 179 void exitHandler(int exitCode) {
180 new TestOutput(testCase, exitCode, timedOut, stdout, 180 new TestOutput(testCase, exitCode, timedOut, stdout,
181 stderr, new Date.now().difference(startTime)); 181 stderr, new Date.now().difference(startTime));
182 process.close(); 182 process.close();
183 timeoutTimer.cancel(); 183 timeoutTimer.cancel();
184 testCase.completed(); 184 testCase.completed();
185 } 185 }
186 186
187 void compilerExitHandler(int exitCode) { 187 void compilerExitHandler(int exitCode) {
188 process.close();
189 if (exitCode != 0) { 188 if (exitCode != 0) {
190 exitHandler(exitCode); 189 exitHandler(exitCode);
191 } else { 190 } else {
191 process.close();
192 runCommand(testCase.executablePath, testCase.arguments, exitHandler); 192 runCommand(testCase.executablePath, testCase.arguments, exitHandler);
193 } 193 }
194 } 194 }
195 195
196 void makeReadHandler(StringInputStream source, List<String> destination) { 196 void makeReadHandler(StringInputStream source, List<String> destination) {
197 return () { 197 return () {
198 if (source.closed) return; // TODO(whesse): Remove when bug is fixed. 198 if (source.closed) return; // TODO(whesse): Remove when bug is fixed.
199 var line = source.readLine(); 199 var line = source.readLine();
200 while (null != line) { 200 while (null != line) {
201 destination.add(line); 201 destination.add(line);
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 if (test.configuration['component'] == 'dartc') { 466 if (test.configuration['component'] == 'dartc') {
467 _ensureDartcBatchRunnersStarted(test.executablePath); 467 _ensureDartcBatchRunnersStarted(test.executablePath);
468 _getDartcBatchRunnerProcess().startTest(test); 468 _getDartcBatchRunnerProcess().startTest(test);
469 } else { 469 } else {
470 new RunningProcess(test).start(); 470 new RunningProcess(test).start();
471 } 471 }
472 _numProcesses++; 472 _numProcesses++;
473 } 473 }
474 } 474 }
475 } 475 }
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