| OLD | NEW |
| 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_suite"); | 5 #library("test_suite"); |
| 6 | 6 |
| 7 #import("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
| 8 #import("test_runner.dart"); | 8 #import("test_runner.dart"); |
| 9 #import("multitest.dart"); | 9 #import("multitest.dart"); |
| 10 | 10 |
| 11 #source("browser_test.dart"); | 11 #source("browser_test.dart"); |
| 12 | 12 |
| 13 interface TestSuite { | 13 interface TestSuite { |
| 14 void forEachTest(Function onTest, Map testCache, [Function onDone]); | 14 void forEachTest(Function onTest, Map testCache, [Function onDone]); |
| 15 } | 15 } |
| 16 | 16 |
| 17 | 17 |
| 18 class CCTestListerIsolate extends Isolate { | 18 class CCTestListerIsolate extends Isolate { |
| 19 CCTestListerIsolate() : super.heavy(); | 19 CCTestListerIsolate() : super.heavy(); |
| 20 | 20 |
| 21 void main() { | 21 void main() { |
| 22 port.receive((String runnerPath, SendPort replyTo) { | 22 port.receive((String runnerPath, SendPort replyTo) { |
| 23 var p = new Process(runnerPath, ["--list"]); | 23 var p = new Process(runnerPath, ["--list"]); |
| 24 StringInputStream stdoutStream = new StringInputStream(p.stdout); | 24 StringInputStream stdoutStream = new StringInputStream(p.stdout); |
| 25 List<String> tests = new List<String>(); | 25 List<String> tests = new List<String>(); |
| 26 stdoutStream.dataHandler = () { | 26 stdoutStream.lineHandler = () { |
| 27 String line = stdoutStream.readLine(); | 27 String line = stdoutStream.readLine(); |
| 28 while (line != null) { | 28 while (line != null) { |
| 29 tests.add(line); | 29 tests.add(line); |
| 30 line = stdoutStream.readLine(); | 30 line = stdoutStream.readLine(); |
| 31 } | 31 } |
| 32 }; | 32 }; |
| 33 p.exitHandler = (code) { | 33 p.exitHandler = (code) { |
| 34 if (code < 0) { | 34 if (code < 0) { |
| 35 print("Failed to list tests: $runnerPath --list"); | 35 print("Failed to list tests: $runnerPath --list"); |
| 36 replyTo.send(""); | 36 replyTo.send(""); |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 * $noCrash tests are expected to be flaky but not crash | 722 * $noCrash tests are expected to be flaky but not crash |
| 723 * $pass tests are expected to pass | 723 * $pass tests are expected to pass |
| 724 * $failOk tests are expected to fail that we won't fix | 724 * $failOk tests are expected to fail that we won't fix |
| 725 * $fail tests are expected to fail that we should fix | 725 * $fail tests are expected to fail that we should fix |
| 726 * $crash tests are expected to crash that we should fix | 726 * $crash tests are expected to crash that we should fix |
| 727 * $timeout tests are allowed to timeout\ | 727 * $timeout tests are allowed to timeout\ |
| 728 """; | 728 """; |
| 729 print(report); | 729 print(report); |
| 730 } | 730 } |
| 731 } | 731 } |
| OLD | NEW |