| 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 part of test_controller; | 5 part of test_controller; |
| 6 | 6 |
| 7 /** Path to DRT executable. */ | 7 /** Path to DRT executable. */ |
| 8 String drt; | 8 String drt; |
| 9 | 9 |
| 10 /** Whether to include elapsed time. */ | 10 /** Whether to include elapsed time. */ |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Support for running in isolates. | 192 // Support for running in isolates. |
| 193 | 193 |
| 194 class TestRunnerChildConfiguration extends Configuration { | 194 class TestRunnerChildConfiguration extends Configuration { |
| 195 get name => 'Test runner child configuration'; | 195 get name => 'Test runner child configuration'; |
| 196 get autoStart => false; | 196 get autoStart => false; |
| 197 | 197 |
| 198 void onSummary(int passed, int failed, int errors, | 198 void onSummary(int passed, int failed, int errors, |
| 199 List<TestCase> results, String uncaughtError) { | 199 List<TestCase> results, String uncaughtError) { |
| 200 TestCase test = results[0]; | 200 TestCase test = results[0]; |
| 201 parentPort.send([test.result, test.runningTime.inMilliseconds, | 201 parentPort.send([test.result, test.runningTime.inMilliseconds, |
| 202 test.message, test.stackTrace]); | 202 test.message, test.stackTrace.toString()]); |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 | 205 |
| 206 var parentPort; | 206 var parentPort; |
| 207 runChildTest() { | 207 runChildTest() { |
| 208 port.receive((testName, sendport) { | 208 port.receive((testName, sendport) { |
| 209 parentPort = sendport; | 209 parentPort = sendport; |
| 210 unittestConfiguration = new TestRunnerChildConfiguration(); | 210 unittestConfiguration = new TestRunnerChildConfiguration(); |
| 211 groupSep = marker; | 211 groupSep = marker; |
| 212 group('', test.main); | 212 group('', test.main); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } | 260 } |
| 261 | 261 |
| 262 process(testMain, action) { | 262 process(testMain, action) { |
| 263 groupSep = marker; | 263 groupSep = marker; |
| 264 unittestConfiguration = new TestRunnerConfiguration(); | 264 unittestConfiguration = new TestRunnerConfiguration(); |
| 265 group('', testMain); | 265 group('', testMain); |
| 266 // Do any user-specified test filtering. | 266 // Do any user-specified test filtering. |
| 267 filterTests(filterTest); | 267 filterTests(filterTest); |
| 268 action(); | 268 action(); |
| 269 } | 269 } |
| OLD | NEW |