Unverified Commit 9f9676c4 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Eliminate Dart 1 support in devicelab tests (#21240)

Flutter commands all default to --preview-dart-2. Eliminate support for
the use of this option and the previewDart2 parameter in dev/devicelab
tests.
parent eab5cd98
...@@ -55,12 +55,6 @@ void main() async { ...@@ -55,12 +55,6 @@ void main() async {
} }
}); });
await runProjectTest((FlutterProject project) async {
section('gradlew assembleDebug no-preview-dart-2');
await project.runGradleTask('assembleDebug',
options: <String>['-Ppreview-dart-2=false']);
});
await runProjectTest((FlutterProject project) async { await runProjectTest((FlutterProject project) async {
section('gradlew assembleProfile'); section('gradlew assembleProfile');
await project.runGradleTask('assembleProfile'); await project.runGradleTask('assembleProfile');
......
...@@ -20,7 +20,7 @@ TaskFunction createMicrobenchmarkTask() { ...@@ -20,7 +20,7 @@ TaskFunction createMicrobenchmarkTask() {
final Device device = await devices.workingDevice; final Device device = await devices.workingDevice;
await device.unlock(); await device.unlock();
Future<Map<String, double>> _runMicrobench(String benchmarkPath, {bool previewDart2 = true}) async { Future<Map<String, double>> _runMicrobench(String benchmarkPath) async {
Future<Map<String, double>> _run() async { Future<Map<String, double>> _run() async {
print('Running $benchmarkPath'); print('Running $benchmarkPath');
final Directory appDir = dir( final Directory appDir = dir(
...@@ -35,10 +35,6 @@ TaskFunction createMicrobenchmarkTask() { ...@@ -35,10 +35,6 @@ TaskFunction createMicrobenchmarkTask() {
'-d', '-d',
device.deviceId, device.deviceId,
]; ];
if (previewDart2)
options.add('--preview-dart-2');
else
options.add('--no-preview-dart-2');
setLocalEngineOptionIfNecessary(options); setLocalEngineOptionIfNecessary(options);
options.add(benchmarkPath); options.add(benchmarkPath);
return await _startFlutter( return await _startFlutter(
......
...@@ -194,7 +194,7 @@ class CompileTest { ...@@ -194,7 +194,7 @@ class CompileTest {
}); });
} }
static Future<Map<String, dynamic>> _compileAot({ bool previewDart2 = true }) async { static Future<Map<String, dynamic>> _compileAot() async {
// Generate blobs instead of assembly. // Generate blobs instead of assembly.
await flutter('clean'); await flutter('clean');
final Stopwatch watch = new Stopwatch()..start(); final Stopwatch watch = new Stopwatch()..start();
...@@ -214,10 +214,6 @@ class CompileTest { ...@@ -214,10 +214,6 @@ class CompileTest {
options.add('android-arm'); options.add('android-arm');
break; break;
} }
if (previewDart2)
options.add('--preview-dart-2');
else
options.add('--no-preview-dart-2');
setLocalEngineOptionIfNecessary(options); setLocalEngineOptionIfNecessary(options);
final String compileLog = await evalFlutter('build', options: options); final String compileLog = await evalFlutter('build', options: options);
watch.stop(); watch.stop();
...@@ -235,15 +231,11 @@ class CompileTest { ...@@ -235,15 +231,11 @@ class CompileTest {
return metrics; return metrics;
} }
static Future<Map<String, dynamic>> _compileApp({ bool previewDart2 = true, bool reportPackageContentSizes = false }) async { static Future<Map<String, dynamic>> _compileApp({ bool reportPackageContentSizes = false }) async {
await flutter('clean'); await flutter('clean');
final Stopwatch watch = new Stopwatch(); final Stopwatch watch = new Stopwatch();
int releaseSizeInBytes; int releaseSizeInBytes;
final List<String> options = <String>['--release']; final List<String> options = <String>['--release'];
if (previewDart2)
options.add('--preview-dart-2');
else
options.add('--no-preview-dart-2');
setLocalEngineOptionIfNecessary(options); setLocalEngineOptionIfNecessary(options);
final Map<String, dynamic> metrics = <String, dynamic>{}; final Map<String, dynamic> metrics = <String, dynamic>{};
...@@ -287,14 +279,10 @@ class CompileTest { ...@@ -287,14 +279,10 @@ class CompileTest {
return metrics; return metrics;
} }
static Future<Map<String, dynamic>> _compileDebug({ bool previewDart2 = true }) async { static Future<Map<String, dynamic>> _compileDebug() async {
await flutter('clean'); await flutter('clean');
final Stopwatch watch = new Stopwatch(); final Stopwatch watch = new Stopwatch();
final List<String> options = <String>['--debug']; final List<String> options = <String>['--debug'];
if (previewDart2)
options.add('--preview-dart-2');
else
options.add('--no-preview-dart-2');
setLocalEngineOptionIfNecessary(options); setLocalEngineOptionIfNecessary(options);
switch (deviceOperatingSystem) { switch (deviceOperatingSystem) {
case DeviceOperatingSystem.ios: case DeviceOperatingSystem.ios:
......
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