test flutter framework with null-safety (#59280)
This commit is contained in:
parent
1fe0f22645
commit
65ef1f94bb
@ -544,24 +544,27 @@ Future<void> _runAddToAppLifeCycleTests() async {
|
|||||||
|
|
||||||
Future<void> _runFrameworkTests() async {
|
Future<void> _runFrameworkTests() async {
|
||||||
final bq.BigqueryApi bigqueryApi = await _getBigqueryApi();
|
final bq.BigqueryApi bigqueryApi = await _getBigqueryApi();
|
||||||
|
final List<String> nullSafetyOptions = <String>['--enable-experiment=non-nullable', '--no-sound-null-safety'];
|
||||||
|
final List<String> trackWidgetCreationAlternatives = <String>['--track-widget-creation', '--no-track-widget-creation'];
|
||||||
|
|
||||||
Future<void> runWidgets() async {
|
Future<void> runWidgets() async {
|
||||||
print('${green}Running packages/flutter tests for$reset: ${cyan}test/widgets/$reset');
|
print('${green}Running packages/flutter tests for$reset: ${cyan}test/widgets/$reset');
|
||||||
|
for (final String trackWidgetCreationOption in trackWidgetCreationAlternatives) {
|
||||||
await _runFlutterTest(
|
await _runFlutterTest(
|
||||||
path.join(flutterRoot, 'packages', 'flutter'),
|
path.join(flutterRoot, 'packages', 'flutter'),
|
||||||
options: <String>['--track-widget-creation'],
|
options: <String>[trackWidgetCreationOption, ...nullSafetyOptions],
|
||||||
tableData: bigqueryApi?.tabledata,
|
|
||||||
tests: <String>[ path.join('test', 'widgets') + path.separator ],
|
|
||||||
);
|
|
||||||
await _runFlutterTest(
|
|
||||||
path.join(flutterRoot, 'packages', 'flutter'),
|
|
||||||
options: <String>['--no-track-widget-creation'],
|
|
||||||
tableData: bigqueryApi?.tabledata,
|
tableData: bigqueryApi?.tabledata,
|
||||||
tests: <String>[ path.join('test', 'widgets') + path.separator ],
|
tests: <String>[ path.join('test', 'widgets') + path.separator ],
|
||||||
);
|
);
|
||||||
|
}
|
||||||
// Try compiling code outside of the packages/flutter directory with and without --track-widget-creation
|
// Try compiling code outside of the packages/flutter directory with and without --track-widget-creation
|
||||||
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'flutter_gallery'), options: <String>['--track-widget-creation'], tableData: bigqueryApi?.tabledata);
|
for (final String trackWidgetCreationOption in trackWidgetCreationAlternatives) {
|
||||||
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'flutter_gallery'), options: <String>['--no-track-widget-creation'], tableData: bigqueryApi?.tabledata);
|
await _runFlutterTest(
|
||||||
|
path.join(flutterRoot, 'dev', 'integration_tests', 'flutter_gallery'),
|
||||||
|
options: <String>[trackWidgetCreationOption],
|
||||||
|
tableData: bigqueryApi?.tabledata,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> runLibraries() async {
|
Future<void> runLibraries() async {
|
||||||
@ -572,19 +575,15 @@ Future<void> _runFrameworkTests() async {
|
|||||||
.map<String>((Directory dir) => path.join('test', path.basename(dir.path)) + path.separator)
|
.map<String>((Directory dir) => path.join('test', path.basename(dir.path)) + path.separator)
|
||||||
.toList();
|
.toList();
|
||||||
print('${green}Running packages/flutter tests$reset for: $cyan${tests.join(", ")}$reset');
|
print('${green}Running packages/flutter tests$reset for: $cyan${tests.join(", ")}$reset');
|
||||||
|
for (final String trackWidgetCreationOption in trackWidgetCreationAlternatives) {
|
||||||
await _runFlutterTest(
|
await _runFlutterTest(
|
||||||
path.join(flutterRoot, 'packages', 'flutter'),
|
path.join(flutterRoot, 'packages', 'flutter'),
|
||||||
options: <String>['--track-widget-creation'],
|
options: <String>[trackWidgetCreationOption, ...nullSafetyOptions],
|
||||||
tableData: bigqueryApi?.tabledata,
|
|
||||||
tests: tests,
|
|
||||||
);
|
|
||||||
await _runFlutterTest(
|
|
||||||
path.join(flutterRoot, 'packages', 'flutter'),
|
|
||||||
options: <String>['--no-track-widget-creation'],
|
|
||||||
tableData: bigqueryApi?.tabledata,
|
tableData: bigqueryApi?.tabledata,
|
||||||
tests: tests,
|
tests: tests,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> runMisc() async {
|
Future<void> runMisc() async {
|
||||||
print('${green}Running package tests$reset for directories other than packages/flutter');
|
print('${green}Running package tests$reset for directories other than packages/flutter');
|
||||||
@ -604,9 +603,7 @@ Future<void> _runFrameworkTests() async {
|
|||||||
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_localizations'), tableData: bigqueryApi?.tabledata);
|
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_localizations'), tableData: bigqueryApi?.tabledata);
|
||||||
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'), tableData: bigqueryApi?.tabledata);
|
await _runFlutterTest(path.join(flutterRoot, 'packages', 'flutter_test'), tableData: bigqueryApi?.tabledata);
|
||||||
await _runFlutterTest(path.join(flutterRoot, 'packages', 'fuchsia_remote_debug_protocol'), tableData: bigqueryApi?.tabledata);
|
await _runFlutterTest(path.join(flutterRoot, 'packages', 'fuchsia_remote_debug_protocol'), tableData: bigqueryApi?.tabledata);
|
||||||
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'non_nullable'),
|
await _runFlutterTest(path.join(flutterRoot, 'dev', 'integration_tests', 'non_nullable'), options: nullSafetyOptions);
|
||||||
options: <String>['--enable-experiment=non-nullable', '--no-sound-null-safety'],
|
|
||||||
);
|
|
||||||
await _runFlutterTest(
|
await _runFlutterTest(
|
||||||
path.join(flutterRoot, 'dev', 'tracing_tests'),
|
path.join(flutterRoot, 'dev', 'tracing_tests'),
|
||||||
options: <String>['--enable-vmservice'],
|
options: <String>['--enable-vmservice'],
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
// @dart = 2.8
|
||||||
|
|
||||||
// This example shows how to build a render tree with a non-cartesian coordinate
|
// This example shows how to build a render tree with a non-cartesian coordinate
|
||||||
// system. Most of the guts of this examples are in src/sector_layout.dart.
|
// system. Most of the guts of this examples are in src/sector_layout.dart.
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
// @dart = 2.8
|
||||||
|
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:flutter/rendering.dart';
|
import 'package:flutter/rendering.dart';
|
||||||
|
@ -5,7 +5,7 @@ homepage: http://flutter.dev
|
|||||||
|
|
||||||
environment:
|
environment:
|
||||||
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
|
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
|
||||||
sdk: ">=2.2.2 <3.0.0"
|
sdk: ">=2.9.0-14.0.dev <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
# To update these, use "flutter update-packages --force-upgrade".
|
# To update these, use "flutter update-packages --force-upgrade".
|
||||||
|
Loading…
x
Reference in New Issue
Block a user