Test that flutter analyze catches no error if two imported libraries
have the same name.
Also, make tests know how to find the flutter root and fix style in one
test to be consistent with the rest of the file.
flutter start's method of finding devices to run the app on is not suitable for flutter drive.
This commit also refactors several tool services to allow mocking in unit tests.
"flutter create" adds option `--with-driver-test` that adds
dependencies to `flutter_driver` in `pubspec.yaml` and creates
a basic driver test runnable via `flutter drive
--target=test_driver/e2e.dart`
"flutter drive" new options:
- `--keep-app-running` tells the driver to not stop the app after tests
are done
- `--use-existing-app` tells the driver to not start a new app but use
an already running instance
Runs a test app and a driver test simultaneously, then stops the app.
Usage:
```
flutter drive --target=/path/to/test/app.dart
```
This command will look for `/path/to/test/app_test.dart` by
convention. We will expand into other ways of discovering tests in the
future.