| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 vmservice_test_helper; | 5 library vmservice_test_helper; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 if (line == '') { | 148 if (line == '') { |
| 149 // Received blank line. | 149 // Received blank line. |
| 150 blank = true; | 150 blank = true; |
| 151 } | 151 } |
| 152 if (portNumber != null && blank == true && first == true) { | 152 if (portNumber != null && blank == true && first == true) { |
| 153 completer.complete(portNumber); | 153 completer.complete(portNumber); |
| 154 // Stop repeat completions. | 154 // Stop repeat completions. |
| 155 first = false; | 155 first = false; |
| 156 print('** Signaled to run test queries on $portNumber'); | 156 print('** Signaled to run test queries on $portNumber'); |
| 157 } | 157 } |
| 158 print(line); | |
| 159 }); | 158 }); |
| 160 process.stderr.transform(UTF8.decoder) | 159 process.stderr.transform(UTF8.decoder) |
| 161 .transform(new LineSplitter()).listen((line) { | 160 .transform(new LineSplitter()).listen((line) { |
| 162 print(line); | 161 print(line); |
| 163 }); | 162 }); |
| 164 process.exitCode.then((code) { | 163 process.exitCode.then((code) { |
| 165 Expect.equals(0, code, 'Launched dart executable exited with error.'); | 164 Expect.equals(0, code, 'Launched dart executable exited with error.'); |
| 166 }); | 165 }); |
| 167 return completer.future; | 166 return completer.future; |
| 168 }); | 167 }); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 }); | 265 }); |
| 267 }); | 266 }); |
| 268 return Future.wait(requests).then((a) { | 267 return Future.wait(requests).then((a) { |
| 269 a.forEach((FieldRequestHelper field) { | 268 a.forEach((FieldRequestHelper field) { |
| 270 fields[field.field['name']] = field.field; | 269 fields[field.field['name']] = field.field; |
| 271 }); | 270 }); |
| 272 return this; | 271 return this; |
| 273 }); | 272 }); |
| 274 } | 273 } |
| 275 } | 274 } |
| OLD | NEW |