| 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.start(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.lineHandler = () { | 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(""); |
| 37 } | 37 } |
| 38 for (String test in tests) { | 38 for (String test in tests) { |
| 39 replyTo.send(test); | 39 replyTo.send(test); |
| 40 } | 40 } |
| 41 replyTo.send(""); | 41 replyTo.send(""); |
| 42 }; | 42 }; |
| 43 p.start(); | |
| 44 }); | 43 }); |
| 45 } | 44 } |
| 46 } | 45 } |
| 47 | 46 |
| 48 | 47 |
| 49 class CCTestSuite implements TestSuite { | 48 class CCTestSuite implements TestSuite { |
| 50 Map configuration; | 49 Map configuration; |
| 51 String suiteName; | 50 String suiteName; |
| 52 String runnerPath; | 51 String runnerPath; |
| 53 List<String> statusFilePaths; | 52 List<String> statusFilePaths; |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 * $noCrash tests are expected to be flaky but not crash | 867 * $noCrash tests are expected to be flaky but not crash |
| 869 * $pass tests are expected to pass | 868 * $pass tests are expected to pass |
| 870 * $failOk tests are expected to fail that we won't fix | 869 * $failOk tests are expected to fail that we won't fix |
| 871 * $fail tests are expected to fail that we should fix | 870 * $fail tests are expected to fail that we should fix |
| 872 * $crash tests are expected to crash that we should fix | 871 * $crash tests are expected to crash that we should fix |
| 873 * $timeout tests are allowed to timeout\ | 872 * $timeout tests are allowed to timeout\ |
| 874 """; | 873 """; |
| 875 print(report); | 874 print(report); |
| 876 } | 875 } |
| 877 } | 876 } |
| OLD | NEW |