Unverified Commit 05edc00a authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Eliminate Dart 1 support from Flutter test (#21408)

parent 61719c4e
...@@ -121,7 +121,6 @@ Future<Null> run(List<String> args) async { ...@@ -121,7 +121,6 @@ Future<Null> run(List<String> args) async {
watcher: collector, watcher: collector,
ipv6: false, ipv6: false,
enableObservatory: collector != null, enableObservatory: collector != null,
previewDart2: true,
precompiledDillPath: dillFile.path, precompiledDillPath: dillFile.path,
concurrency: math.max(1, platform.numberOfProcessors - 2), concurrency: math.max(1, platform.numberOfProcessors - 2),
); );
......
...@@ -167,7 +167,6 @@ class TestCommand extends FlutterCommand { ...@@ -167,7 +167,6 @@ class TestCommand extends FlutterCommand {
startPaused: startPaused, startPaused: startPaused,
ipv6: argResults['ipv6'], ipv6: argResults['ipv6'],
machine: machine, machine: machine,
previewDart2: true,
trackWidgetCreation: argResults['track-widget-creation'], trackWidgetCreation: argResults['track-widget-creation'],
updateGoldens: argResults['update-goldens'], updateGoldens: argResults['update-goldens'],
concurrency: jobs, concurrency: jobs,
......
...@@ -68,7 +68,6 @@ void installHook({ ...@@ -68,7 +68,6 @@ void installHook({
bool enableObservatory = false, bool enableObservatory = false,
bool machine = false, bool machine = false,
bool startPaused = false, bool startPaused = false,
bool previewDart2 = true,
int port = 0, int port = 0,
String precompiledDillPath, String precompiledDillPath,
bool trackWidgetCreation = false, bool trackWidgetCreation = false,
...@@ -88,7 +87,6 @@ void installHook({ ...@@ -88,7 +87,6 @@ void installHook({
startPaused: startPaused, startPaused: startPaused,
explicitObservatoryPort: observatoryPort, explicitObservatoryPort: observatoryPort,
host: _kHosts[serverType], host: _kHosts[serverType],
previewDart2: previewDart2,
port: port, port: port,
precompiledDillPath: precompiledDillPath, precompiledDillPath: precompiledDillPath,
trackWidgetCreation: trackWidgetCreation, trackWidgetCreation: trackWidgetCreation,
...@@ -339,7 +337,6 @@ class _FlutterPlatform extends PlatformPlugin { ...@@ -339,7 +337,6 @@ class _FlutterPlatform extends PlatformPlugin {
this.startPaused, this.startPaused,
this.explicitObservatoryPort, this.explicitObservatoryPort,
this.host, this.host,
this.previewDart2,
this.port, this.port,
this.precompiledDillPath, this.precompiledDillPath,
this.trackWidgetCreation, this.trackWidgetCreation,
...@@ -354,7 +351,6 @@ class _FlutterPlatform extends PlatformPlugin { ...@@ -354,7 +351,6 @@ class _FlutterPlatform extends PlatformPlugin {
final bool startPaused; final bool startPaused;
final int explicitObservatoryPort; final int explicitObservatoryPort;
final InternetAddress host; final InternetAddress host;
final bool previewDart2;
final int port; final int port;
final String precompiledDillPath; final String precompiledDillPath;
final bool trackWidgetCreation; final bool trackWidgetCreation;
...@@ -447,15 +443,13 @@ class _FlutterPlatform extends PlatformPlugin { ...@@ -447,15 +443,13 @@ class _FlutterPlatform extends PlatformPlugin {
printTrace('test $ourTestCount: starting shell process'); printTrace('test $ourTestCount: starting shell process');
// [precompiledDillPath] can be set only if [previewDart2] is [true].
assert(precompiledDillPath == null || previewDart2);
// If a kernel file is given, then use that to launch the test. // If a kernel file is given, then use that to launch the test.
// Otherwise create a "listener" dart that invokes actual test. // Otherwise create a "listener" dart that invokes actual test.
String mainDart = precompiledDillPath != null String mainDart = precompiledDillPath != null
? precompiledDillPath ? precompiledDillPath
: _createListenerDart(finalizers, ourTestCount, testPath, server); : _createListenerDart(finalizers, ourTestCount, testPath, server);
if (previewDart2 && precompiledDillPath == null) { if (precompiledDillPath == null) {
// Lazily instantiate compiler so it is built only if it is actually used. // Lazily instantiate compiler so it is built only if it is actually used.
compiler ??= new _Compiler(trackWidgetCreation, projectRootDirectory); compiler ??= new _Compiler(trackWidgetCreation, projectRootDirectory);
mainDart = await compiler.compile(mainDart); mainDart = await compiler.compile(mainDart);
...@@ -705,10 +699,6 @@ class _FlutterPlatform extends PlatformPlugin { ...@@ -705,10 +699,6 @@ class _FlutterPlatform extends PlatformPlugin {
} }
String _getBundlePath(List<_Finalizer> finalizers, int ourTestCount) { String _getBundlePath(List<_Finalizer> finalizers, int ourTestCount) {
if (!previewDart2) {
return null;
}
if (precompiledDillPath != null) { if (precompiledDillPath != null) {
return artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath); return artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath);
} }
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
import 'dart:async'; import 'dart:async';
import 'package:args/command_runner.dart';
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:test/src/executable.dart' as test; // ignore: implementation_imports import 'package:test/src/executable.dart' as test; // ignore: implementation_imports
...@@ -29,20 +28,12 @@ Future<int> runTests( ...@@ -29,20 +28,12 @@ Future<int> runTests(
bool startPaused = false, bool startPaused = false,
bool ipv6 = false, bool ipv6 = false,
bool machine = false, bool machine = false,
bool previewDart2 = true,
String precompiledDillPath, String precompiledDillPath,
bool trackWidgetCreation = false, bool trackWidgetCreation = false,
bool updateGoldens = false, bool updateGoldens = false,
TestWatcher watcher, TestWatcher watcher,
@required int concurrency, @required int concurrency,
}) async { }) async {
if (trackWidgetCreation && !previewDart2) {
throw new UsageException(
'--track-widget-creation is valid only when previewDart2 is specified.',
null,
);
}
// Compute the command-line arguments for package:test. // Compute the command-line arguments for package:test.
final List<String> testArgs = <String>[]; final List<String> testArgs = <String>[];
if (!terminal.supportsColor) { if (!terminal.supportsColor) {
...@@ -83,7 +74,6 @@ Future<int> runTests( ...@@ -83,7 +74,6 @@ Future<int> runTests(
machine: machine, machine: machine,
startPaused: startPaused, startPaused: startPaused,
serverType: serverType, serverType: serverType,
previewDart2: previewDart2,
precompiledDillPath: precompiledDillPath, precompiledDillPath: precompiledDillPath,
trackWidgetCreation: trackWidgetCreation, trackWidgetCreation: trackWidgetCreation,
updateGoldens: updateGoldens, updateGoldens: updateGoldens,
......
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