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

Unified Diff: runtime/observatory/tests/service/test_helper.dart

Issue 2156243002: Fix DevFS on Android devices (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« runtime/bin/directory_android.cc ('K') | « runtime/bin/embedded_dart_io.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/test_helper.dart
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 0e8b6e932af424b757e26dcf039252d1c5dd47f0..1a66047744b07f4c4d465c7f5891d0a0b17ea9d8 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -255,6 +255,63 @@ class _ServiceTesteeLauncher {
}
}
+// A tester runner that doesn't spawn a process but instead connects to
+// an already running flutter application running on a device. Assumes
+// port 8100. This is only useful for debugging.
+class _FlutterDeviceServiceTesterRunner {
+ void run({List<String> mainArgs,
+ List<VMTest> vmTests,
+ List<IsolateTest> isolateTests,
+ bool pause_on_start: false,
+ bool pause_on_exit: false,
+ bool trace_service: false,
+ bool trace_compiler: false,
+ bool verbose_vm: false,
+ bool pause_on_unhandled_exceptions: false}) {
+ var port = 8100;
+ serviceWebsocketAddress = 'ws://localhost:$port/ws';
+ serviceHttpAddress = 'http://localhost:$port';
+ var name = Platform.script.pathSegments.last;
+ runZoned(() async {
+ var vm =
+ new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress));
+ print('Loading VM...');
+ await vm.load();
+ print('Done loading VM');
+
+ // Run vm tests.
+ if (vmTests != null) {
+ var testIndex = 1;
+ var totalTests = vmTests.length;
+ for (var test in vmTests) {
+ vm.verbose = verbose_vm;
+ print('Running $name [$testIndex/$totalTests]');
+ testIndex++;
+ await test(vm);
+ }
+ }
+
+ // Run isolate tests.
+ if (isolateTests != null) {
+ var isolate = await vm.isolates.first.load();
+ var testIndex = 1;
+ var totalTests = isolateTests.length;
+ for (var test in isolateTests) {
+ vm.verbose = verbose_vm;
+ print('Running $name [$testIndex/$totalTests]');
+ testIndex++;
+ await test(isolate);
+ }
+ }
+ }, onError: (e, st) {
+ if (!_isWebSocketDisconnect(e)) {
+ print('Unexpected exception in service tests: $e $st');
+ throw e;
+ }
+ });
+ }
+}
+
class _ServiceTesterRunner {
void run({List<String> mainArgs,
List<VMTest> vmTests,
« runtime/bin/directory_android.cc ('K') | « runtime/bin/embedded_dart_io.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698