diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8589ae04f4..e114f7759c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,10 +101,7 @@ Individual tests can also be run directly, e.g. `flutter test lib/my_app_test.da Flutter tests use [package:flutter_test](https://github.com/flutter/flutter/tree/master/packages/flutter_test) which provides flutter-specific extensions on top of [package:test](https://pub.dartlang.org/packages/test). -`flutter test` runs tests inside the flutter shell. Some packages inside the flutter repository can be run inside the dart command line VM as well as the flutter shell, `packages/flutter_tools` is one such example: - - * `cd packages/flutter_tools` - * `dart test/all.dart` +`flutter test` runs tests inside the flutter shell. To run all the tests for the entire Flutter repository, the same way that Travis runs them, run `dev/bots/test.sh`. @@ -123,6 +120,24 @@ To add a test to the Flutter package, create a file whose name ends with `_test.dart` in the `packages/flutter/test` directory. The test should have a `main` function and use the `test` package. +Working with flutter tools +-------------------------- + +The flutter tools itself is built when you run `flutter` for the first time and each time +you run `flutter upgrade`. If you want to alter and re-test the tool's behavior itself, +locally commit your tool changes in git and the tool will be rebuilt from Dart sources +in `packages/flutter_tools` the next time you run `flutter`. + +flutter_tools' tests run inside the Dart command line VM rather than in the +flutter shell. To run the test: + +* `cd packages/flutter_tools` +* `dart test/all.dart` + +The pre-built flutter tool runs in release mode with the observatory off by default. +To enable debugging mode and the observatory on the `flutter` tool, uncomment the +`FLUTTER_TOOL_ARGS` line in the `bin/flutter` shell script. + Contributing code -----------------