From 7e3ebfc7e05258491c8fa50a4fbb6ad18721b027 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Thu, 6 Sep 2018 13:08:34 +0100 Subject: [PATCH] Rename test file to end with _test so it runs on the bots (#21438) * Rename test file * Fix detection to work regardless of whether there are other devices On Windows we get one message, but on Mac we get another (because of the Simulator always being available). --- .../integration/{flutter_run.dart => flutter_run_test.dart} | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename packages/flutter_tools/test/integration/{flutter_run.dart => flutter_run_test.dart} (85%) diff --git a/packages/flutter_tools/test/integration/flutter_run.dart b/packages/flutter_tools/test/integration/flutter_run_test.dart similarity index 85% rename from packages/flutter_tools/test/integration/flutter_run.dart rename to packages/flutter_tools/test/integration/flutter_run_test.dart index f8b8d0e9d8..8374eebe9a 100644 --- a/packages/flutter_tools/test/integration/flutter_run.dart +++ b/packages/flutter_tools/test/integration/flutter_run_test.dart @@ -38,7 +38,10 @@ void main() { expect(_proc.stdout, isNot(contains('flutter has exited unexpectedly'))); expect(_proc.stderr, isNot(contains('flutter has exited unexpectedly'))); - expect(_proc.stderr, contains('Unable to locate a development')); + if (!_proc.stderr.toString().contains('Unable to locate a development') + && !_proc.stdout.toString().contains('No devices found with name or id matching')) { + fail("'flutter run -d invalid-device-id' did not produce the expected error"); + } }); }, timeout: const Timeout.factor(6)); }