From 9f9676c4c6c287ebf775f1b84d3b1587de17c5d5 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Thu, 30 Aug 2018 17:17:37 -0700 Subject: [PATCH] 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. --- .../bin/tasks/gradle_plugin_test.dart | 6 ------ dev/devicelab/lib/tasks/microbenchmarks.dart | 6 +----- dev/devicelab/lib/tasks/perf_tests.dart | 18 +++--------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/dev/devicelab/bin/tasks/gradle_plugin_test.dart b/dev/devicelab/bin/tasks/gradle_plugin_test.dart index 7e218189f8..3cd61e3643 100644 --- a/dev/devicelab/bin/tasks/gradle_plugin_test.dart +++ b/dev/devicelab/bin/tasks/gradle_plugin_test.dart @@ -55,12 +55,6 @@ void main() async { } }); - await runProjectTest((FlutterProject project) async { - section('gradlew assembleDebug no-preview-dart-2'); - await project.runGradleTask('assembleDebug', - options: ['-Ppreview-dart-2=false']); - }); - await runProjectTest((FlutterProject project) async { section('gradlew assembleProfile'); await project.runGradleTask('assembleProfile'); diff --git a/dev/devicelab/lib/tasks/microbenchmarks.dart b/dev/devicelab/lib/tasks/microbenchmarks.dart index 54d98fbdad..2e7a8ea4d1 100644 --- a/dev/devicelab/lib/tasks/microbenchmarks.dart +++ b/dev/devicelab/lib/tasks/microbenchmarks.dart @@ -20,7 +20,7 @@ TaskFunction createMicrobenchmarkTask() { final Device device = await devices.workingDevice; await device.unlock(); - Future> _runMicrobench(String benchmarkPath, {bool previewDart2 = true}) async { + Future> _runMicrobench(String benchmarkPath) async { Future> _run() async { print('Running $benchmarkPath'); final Directory appDir = dir( @@ -35,10 +35,6 @@ TaskFunction createMicrobenchmarkTask() { '-d', device.deviceId, ]; - if (previewDart2) - options.add('--preview-dart-2'); - else - options.add('--no-preview-dart-2'); setLocalEngineOptionIfNecessary(options); options.add(benchmarkPath); return await _startFlutter( diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart index 8f1c8c0ae3..3c3323a86d 100644 --- a/dev/devicelab/lib/tasks/perf_tests.dart +++ b/dev/devicelab/lib/tasks/perf_tests.dart @@ -194,7 +194,7 @@ class CompileTest { }); } - static Future> _compileAot({ bool previewDart2 = true }) async { + static Future> _compileAot() async { // Generate blobs instead of assembly. await flutter('clean'); final Stopwatch watch = new Stopwatch()..start(); @@ -214,10 +214,6 @@ class CompileTest { options.add('android-arm'); break; } - if (previewDart2) - options.add('--preview-dart-2'); - else - options.add('--no-preview-dart-2'); setLocalEngineOptionIfNecessary(options); final String compileLog = await evalFlutter('build', options: options); watch.stop(); @@ -235,15 +231,11 @@ class CompileTest { return metrics; } - static Future> _compileApp({ bool previewDart2 = true, bool reportPackageContentSizes = false }) async { + static Future> _compileApp({ bool reportPackageContentSizes = false }) async { await flutter('clean'); final Stopwatch watch = new Stopwatch(); int releaseSizeInBytes; final List options = ['--release']; - if (previewDart2) - options.add('--preview-dart-2'); - else - options.add('--no-preview-dart-2'); setLocalEngineOptionIfNecessary(options); final Map metrics = {}; @@ -287,14 +279,10 @@ class CompileTest { return metrics; } - static Future> _compileDebug({ bool previewDart2 = true }) async { + static Future> _compileDebug() async { await flutter('clean'); final Stopwatch watch = new Stopwatch(); final List options = ['--debug']; - if (previewDart2) - options.add('--preview-dart-2'); - else - options.add('--no-preview-dart-2'); setLocalEngineOptionIfNecessary(options); switch (deviceOperatingSystem) { case DeviceOperatingSystem.ios: