From 5d8ea59d86c9fdf2e6a5b55ce90dd5b369363b74 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 27 Jun 2018 12:52:32 +0100 Subject: [PATCH] Add process output for flutter_tester test and unskip (#18868) --- .../test/integration/flutter_tester_test.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/test/integration/flutter_tester_test.dart b/packages/flutter_tools/test/integration/flutter_tester_test.dart index 171700016a..1f83d8a79f 100644 --- a/packages/flutter_tools/test/integration/flutter_tester_test.dart +++ b/packages/flutter_tools/test/integration/flutter_tester_test.dart @@ -94,15 +94,20 @@ class MyApp extends StatelessWidget { } '''); + // Capture process output so that if the process quits we can print the + // stdout/stderr in the error. + final StringBuffer logs = new StringBuffer(); + device.getLogReader().logLines.listen(logs.write); + final LaunchResult result = await start(mainPath); expect(result.started, isTrue); expect(result.observatoryUri, isNotNull); await new Future.delayed(const Duration(seconds: 3)); - expect(device.isRunning, true); + expect(device.isRunning, true, reason: 'Device did not remain running.\n\n$logs'.trim()); expect(await device.stopApp(null), isTrue); - }, skip: true); + }); }); }