Commit Graph

13 Commits

Author SHA1 Message Date
Dan Rubel
34e466f1fd Refactor flutter command exit code - part 3 of 3 (#6838)
* Remove the workaround that pinned args to v0.13.6
This reverts most of the changes in commit 6331b6c8b5
* throw exception if exit code is not an integer
* rework command infrastructure to throw ToolExit when non-zero exitCode
* convert commands to return Future<Null>
* cleanup remaining commands to use throwToolExit for non-zero exit code
* remove isUnusual exception message
* add type annotations for updated args package
2016-11-14 14:21:30 -05:00
Dan Rubel
e384c0d982 Refactor flutter command exit code - part 2 (#6817)
* convert pubGet to throw ToolExit on non-zero exit code
* convert commandValidator to throw ToolExit for non-zero exit code
* convert flutter commands to throw ToolExit for non-zero exit code
* use convenience method throwToolExit
* only show "if this problem persists" for unusual exceptions
2016-11-13 22:09:03 -05:00
Yegor
f544abd016 modernize flutter drive w.r.t. debug/profile/release options (#4217)
* modernize `flutter drive` w.r.t. debug/profil/release options

* make error message prettier
2016-05-27 10:02:36 -07:00
Devon Carew
a5b198e9b9 remove the --checked option (#3799) 2016-05-09 10:58:47 -07:00
pq
79d1d3a7c4 Prefer implict equals matcher in test expectations.
@Hixie: as per our conversation, a little more concise.
2016-05-04 13:58:45 -07:00
Devon Carew
c9010c91f6 fix analysis errors (#3677)
* fix analysis errors

* review comments; fix test

* re-add an export for debugPrint
2016-05-03 09:09:00 -07:00
Devon Carew
653566dd23 simplify toolchain setup 2016-04-04 13:10:56 -07:00
Yegor Jbanov
28b5186746 [driver] propagate exit code from package:test
Driver returns exit code 0 even when tests fail. This commit fixes it by
propagating the exit code set by `package:test`.
2016-03-28 16:19:20 -07:00
Hixie
e6b82b6fa9 flutter analyze test
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.
2016-03-11 14:26:38 -08:00
Hixie
c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
Yegor Jbanov
677e63b79d decouple flutter drive from flutter start
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.
2016-02-26 10:18:24 -08:00
yjbanov
278630e688 "flutter create" can generate a basic driver test
"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
2016-02-22 17:10:31 -08:00
yjbanov
a2b1bd4673 "flutter drive" command
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.
2016-02-19 18:11:53 -08:00