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 test_helper; | 5 library 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:observatory/service_io.dart'; | 10 import 'package:observatory/service_io.dart'; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 bool verbose_vm: false, | 326 bool verbose_vm: false, |
327 bool pause_on_unhandled_exceptions: false}) { | 327 bool pause_on_unhandled_exceptions: false}) { |
328 var process = new _ServiceTesteeLauncher(); | 328 var process = new _ServiceTesteeLauncher(); |
329 process.launch(pause_on_start, pause_on_exit, | 329 process.launch(pause_on_start, pause_on_exit, |
330 pause_on_unhandled_exceptions, | 330 pause_on_unhandled_exceptions, |
331 trace_service, trace_compiler).then((port) async { | 331 trace_service, trace_compiler).then((port) async { |
332 if (mainArgs.contains("--gdb")) { | 332 if (mainArgs.contains("--gdb")) { |
333 var pid = process.process.pid; | 333 var pid = process.process.pid; |
334 var wait = new Duration(seconds: 10); | 334 var wait = new Duration(seconds: 10); |
335 print("Testee has pid $pid, waiting $wait before continuing"); | 335 print("Testee has pid $pid, waiting $wait before continuing"); |
| 336 sleep(wait); |
336 } | 337 } |
337 serviceWebsocketAddress = 'ws://localhost:$port/ws'; | 338 serviceWebsocketAddress = 'ws://localhost:$port/ws'; |
338 serviceHttpAddress = 'http://localhost:$port'; | 339 serviceHttpAddress = 'http://localhost:$port'; |
339 var name = Platform.script.pathSegments.last; | 340 var name = Platform.script.pathSegments.last; |
340 runZoned(() async { | 341 runZoned(() async { |
341 var vm = | 342 var vm = |
342 new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress)); | 343 new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress)); |
343 print('Loading VM...'); | 344 print('Loading VM...'); |
344 await vm.load(); | 345 await vm.load(); |
345 print('Done loading VM'); | 346 print('Done loading VM'); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 mainArgs: mainArgs, | 485 mainArgs: mainArgs, |
485 vmTests: tests, | 486 vmTests: tests, |
486 pause_on_start: pause_on_start, | 487 pause_on_start: pause_on_start, |
487 pause_on_exit: pause_on_exit, | 488 pause_on_exit: pause_on_exit, |
488 trace_service: trace_service, | 489 trace_service: trace_service, |
489 trace_compiler: trace_compiler, | 490 trace_compiler: trace_compiler, |
490 verbose_vm: verbose_vm, | 491 verbose_vm: verbose_vm, |
491 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); | 492 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); |
492 } | 493 } |
493 } | 494 } |
OLD | NEW |