| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |