From 606ee3610a6325a9205182a027d7b9de805b95db Mon Sep 17 00:00:00 2001 From: xster Date: Wed, 25 Jan 2017 19:00:06 -0800 Subject: [PATCH] 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 --- CONTRIBUTING.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) 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 -----------------