Chromium Code Reviews| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 vm.verbose = verbose_vm; | 303 vm.verbose = verbose_vm; |
| 304 print('Running $name [$testIndex/$totalTests]'); | 304 print('Running $name [$testIndex/$totalTests]'); |
| 305 testIndex++; | 305 testIndex++; |
| 306 await test(isolate); | 306 await test(isolate); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| 310 await process.requestExit(); | 310 await process.requestExit(); |
| 311 }, onError: (e, st) { | 311 }, onError: (e, st) { |
| 312 process.requestExit(); | 312 process.requestExit(); |
| 313 if (!_isWebSocketDisconnect(e)) { | 313 // TODO: remove this workaround. |
|
Cutch
2016/06/23 17:59:20
Can you please expand on this comment and explain
cbernaschina
2016/06/23 18:27:24
Done.
| |
| 314 // This is necessary due to non awaited operations. | |
| 315 // E.G. object.dart (398~402) | |
| 316 if (st != null || !_isWebSocketDisconnect(e)) { | |
| 314 print('Unexpected exception in service tests: $e $st'); | 317 print('Unexpected exception in service tests: $e $st'); |
| 315 throw e; | 318 throw e; |
| 316 } | 319 } |
| 317 }); | 320 }); |
| 318 }); | 321 }); |
| 319 } | 322 } |
| 320 } | 323 } |
| 321 | 324 |
| 322 /// Runs [tests] in sequence, each of which should take an [Isolate] and | 325 /// Runs [tests] in sequence, each of which should take an [Isolate] and |
| 323 /// return a [Future]. Code for setting up state can run before and/or | 326 /// return a [Future]. Code for setting up state can run before and/or |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 415 mainArgs: mainArgs, | 418 mainArgs: mainArgs, |
| 416 vmTests: tests, | 419 vmTests: tests, |
| 417 pause_on_start: pause_on_start, | 420 pause_on_start: pause_on_start, |
| 418 pause_on_exit: pause_on_exit, | 421 pause_on_exit: pause_on_exit, |
| 419 trace_service: trace_service, | 422 trace_service: trace_service, |
| 420 trace_compiler: trace_compiler, | 423 trace_compiler: trace_compiler, |
| 421 verbose_vm: verbose_vm, | 424 verbose_vm: verbose_vm, |
| 422 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); | 425 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); |
| 423 } | 426 } |
| 424 } | 427 } |
| OLD | NEW |