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

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

Issue 11343009: Get rid of 'close' on process. It is very easy to use incorrectly and cut off data from your stream… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. 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
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | utils/testrunner/layout_test_controller.dart » ('j') | 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 enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 61
62 // TODO(1030): remove once in the corelib. 62 // TODO(1030): remove once in the corelib.
63 bool Contains(element, collection) => collection.indexOf(element) >= 0; 63 bool Contains(element, collection) => collection.indexOf(element) >= 0;
64 64
65 65
66 void ccTestLister() { 66 void ccTestLister() {
67 port.receive((String runnerPath, SendPort replyTo) { 67 port.receive((String runnerPath, SendPort replyTo) {
68 Future processFuture = Process.start(runnerPath, ["--list"]); 68 Future processFuture = Process.start(runnerPath, ["--list"]);
69 processFuture.then((p) { 69 processFuture.then((p) {
70 // Drain stderr to not leak resources.
71 p.stderr.onData = p.stderr.read;
70 StringInputStream stdoutStream = new StringInputStream(p.stdout); 72 StringInputStream stdoutStream = new StringInputStream(p.stdout);
71 var streamDone = false; 73 var streamDone = false;
72 var processExited = false; 74 var processExited = false;
73 checkDone() { 75 checkDone() {
74 if (streamDone && processExited) { 76 if (streamDone && processExited) {
75 replyTo.send(""); 77 replyTo.send("");
76 } 78 }
77 } 79 }
78 stdoutStream.onLine = () { 80 stdoutStream.onLine = () {
79 String line = stdoutStream.readLine(); 81 String line = stdoutStream.readLine();
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1484 * $noCrash tests are expected to be flaky but not crash 1486 * $noCrash tests are expected to be flaky but not crash
1485 * $pass tests are expected to pass 1487 * $pass tests are expected to pass
1486 * $failOk tests are expected to fail that we won't fix 1488 * $failOk tests are expected to fail that we won't fix
1487 * $fail tests are expected to fail that we should fix 1489 * $fail tests are expected to fail that we should fix
1488 * $crash tests are expected to crash that we should fix 1490 * $crash tests are expected to crash that we should fix
1489 * $timeout tests are allowed to timeout 1491 * $timeout tests are allowed to timeout
1490 """; 1492 """;
1491 print(report); 1493 print(report);
1492 } 1494 }
1493 } 1495 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | utils/testrunner/layout_test_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698