Commit 606ee361 authored by xster's avatar xster Committed by GitHub

Add a flutter tools section to CONTRIBUTING.md (#7640)

* Tweak the contributor guide with info on working with the flutter tool

* Slight phrasing

* Review edits on doc phrasing

* Review notes

* Small review tweak
parent 46792dc2
...@@ -101,10 +101,7 @@ Individual tests can also be run directly, e.g. `flutter test lib/my_app_test.da ...@@ -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 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: `flutter test` runs tests inside the flutter shell.
* `cd packages/flutter_tools`
* `dart test/all.dart`
To run all the tests for the entire Flutter repository, the same way that Travis runs them, run `dev/bots/test.sh`. 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 ...@@ -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 ends with `_test.dart` in the `packages/flutter/test` directory. The
test should have a `main` function and use the `test` package. 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 Contributing code
----------------- -----------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment