Run flutter tests with --track-widget-creation as part of the build. (#22596)

This commit is contained in:
Jacob Richman
2018-10-15 13:46:25 -07:00
committed by GitHub
parent 4f4005ee65
commit bf92d7f286
2 changed files with 16 additions and 8 deletions

View File

@@ -175,6 +175,11 @@ Future<void> _runTests() async {
await _runSmokeTests();
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter'));
// Only packages/flutter/test/widgets/widget_inspector_test.dart really
// needs to be run with --track-widget-creation but it is nice to run
// all of the tests in package:flutter with the flag to ensure that
// the Dart kernel transformer triggered by the flag does not break anything.
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter'), options: <String>['--track-widget-creation']);
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_localizations'));
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_driver'));
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'));
@@ -188,6 +193,9 @@ Future<void> _runTests() async {
await _runFlutterTest(path.join(flutterRoot, 'examples', 'layers'));
await _runFlutterTest(path.join(flutterRoot, 'examples', 'stocks'));
await _runFlutterTest(path.join(flutterRoot, 'examples', 'flutter_gallery'));
// Regression test to ensure that code outside of package:flutter can run
// with --track-widget-creation.
await _runFlutterTest(path.join(flutterRoot, 'examples', 'flutter_gallery'), options: <String>['--track-widget-creation']);
await _runFlutterTest(path.join(flutterRoot, 'examples', 'catalog'));
print('${bold}DONE: All tests successful.$reset');