Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: runtime/observatory/tests/service/test_helper.dart

Issue 1760963002: Print isolate properly in debug output for IsolateRunnable events. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 var process = new _ServiceTesteeLauncher(); 268 var process = new _ServiceTesteeLauncher();
269 process.launch(pause_on_start, pause_on_exit, 269 process.launch(pause_on_start, pause_on_exit,
270 pause_on_unhandled_exceptions, 270 pause_on_unhandled_exceptions,
271 trace_service, trace_compiler).then((port) async { 271 trace_service, trace_compiler).then((port) async {
272 if (mainArgs.contains("--gdb")) { 272 if (mainArgs.contains("--gdb")) {
273 port = 8181; 273 port = 8181;
274 } 274 }
275 serviceWebsocketAddress = 'ws://localhost:$port/ws'; 275 serviceWebsocketAddress = 'ws://localhost:$port/ws';
276 serviceHttpAddress = 'http://localhost:$port'; 276 serviceHttpAddress = 'http://localhost:$port';
277 var name = Platform.script.pathSegments.last; 277 var name = Platform.script.pathSegments.last;
278 runZoned(() { 278 runZoned(() async {
279 new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress)).load() 279 var vm =
280 .then((VM vm) async { 280 new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress));
281 print('Loading VM...');
282 await vm.load();
283 print('Done loading VM');
281 284
282 // Run vm tests. 285 // Run vm tests.
283 if (vmTests != null) { 286 if (vmTests != null) {
284 var testIndex = 1; 287 var testIndex = 1;
285 var totalTests = vmTests.length; 288 var totalTests = vmTests.length;
286 for (var test in vmTests) { 289 for (var test in vmTests) {
287 vm.verbose = verbose_vm; 290 vm.verbose = verbose_vm;
288 print('Running $name [$testIndex/$totalTests]'); 291 print('Running $name [$testIndex/$totalTests]');
289 testIndex++; 292 testIndex++;
290 await test(vm); 293 await test(vm);
291 } 294 }
292 } 295 }
293 296
294 // Run isolate tests. 297 // Run isolate tests.
295 if (isolateTests != null) { 298 if (isolateTests != null) {
296 var isolate = await vm.isolates.first.load(); 299 var isolate = await vm.isolates.first.load();
297 var testIndex = 1; 300 var testIndex = 1;
298 var totalTests = isolateTests.length; 301 var totalTests = isolateTests.length;
299 for (var test in isolateTests) { 302 for (var test in isolateTests) {
300 vm.verbose = verbose_vm; 303 vm.verbose = verbose_vm;
301 print('Running $name [$testIndex/$totalTests]'); 304 print('Running $name [$testIndex/$totalTests]');
302 testIndex++; 305 testIndex++;
303 await test(isolate); 306 await test(isolate);
304 } 307 }
305 } 308 }
306 309
307 await process.requestExit(); 310 await process.requestExit();
308 });
309 }, onError: (e, st) { 311 }, onError: (e, st) {
310 process.requestExit(); 312 process.requestExit();
311 if (!_isWebSocketDisconnect(e)) { 313 if (!_isWebSocketDisconnect(e)) {
312 print('Unexpected exception in service tests: $e $st'); 314 print('Unexpected exception in service tests: $e $st');
313 throw e; 315 throw e;
314 } 316 }
315 }); 317 });
316 }); 318 });
317 } 319 }
318 } 320 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 mainArgs: mainArgs, 415 mainArgs: mainArgs,
414 vmTests: tests, 416 vmTests: tests,
415 pause_on_start: pause_on_start, 417 pause_on_start: pause_on_start,
416 pause_on_exit: pause_on_exit, 418 pause_on_exit: pause_on_exit,
417 trace_service: trace_service, 419 trace_service: trace_service,
418 trace_compiler: trace_compiler, 420 trace_compiler: trace_compiler,
419 verbose_vm: verbose_vm, 421 verbose_vm: verbose_vm,
420 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); 422 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions);
421 } 423 }
422 } 424 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698