Eliminate Dart 1 support from Flutter test (#21408)

This commit is contained in:
Chris Bracken 2018-09-05 10:41:44 -07:00 committed by GitHub
parent 61719c4e9f
commit 05edc00a6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 23 deletions

View file

@ -121,7 +121,6 @@ Future<Null> run(List<String> args) async {
watcher: collector,
ipv6: false,
enableObservatory: collector != null,
previewDart2: true,
precompiledDillPath: dillFile.path,
concurrency: math.max(1, platform.numberOfProcessors - 2),
);

View file

@ -167,7 +167,6 @@ class TestCommand extends FlutterCommand {
startPaused: startPaused,
ipv6: argResults['ipv6'],
machine: machine,
previewDart2: true,
trackWidgetCreation: argResults['track-widget-creation'],
updateGoldens: argResults['update-goldens'],
concurrency: jobs,

View file

@ -68,7 +68,6 @@ void installHook({
bool enableObservatory = false,
bool machine = false,
bool startPaused = false,
bool previewDart2 = true,
int port = 0,
String precompiledDillPath,
bool trackWidgetCreation = false,
@ -88,7 +87,6 @@ void installHook({
startPaused: startPaused,
explicitObservatoryPort: observatoryPort,
host: _kHosts[serverType],
previewDart2: previewDart2,
port: port,
precompiledDillPath: precompiledDillPath,
trackWidgetCreation: trackWidgetCreation,
@ -339,7 +337,6 @@ class _FlutterPlatform extends PlatformPlugin {
this.startPaused,
this.explicitObservatoryPort,
this.host,
this.previewDart2,
this.port,
this.precompiledDillPath,
this.trackWidgetCreation,
@ -354,7 +351,6 @@ class _FlutterPlatform extends PlatformPlugin {
final bool startPaused;
final int explicitObservatoryPort;
final InternetAddress host;
final bool previewDart2;
final int port;
final String precompiledDillPath;
final bool trackWidgetCreation;
@ -447,15 +443,13 @@ class _FlutterPlatform extends PlatformPlugin {
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.
// Otherwise create a "listener" dart that invokes actual test.
String mainDart = precompiledDillPath != null
? precompiledDillPath
: _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.
compiler ??= new _Compiler(trackWidgetCreation, projectRootDirectory);
mainDart = await compiler.compile(mainDart);
@ -705,10 +699,6 @@ class _FlutterPlatform extends PlatformPlugin {
}
String _getBundlePath(List<_Finalizer> finalizers, int ourTestCount) {
if (!previewDart2) {
return null;
}
if (precompiledDillPath != null) {
return artifacts.getArtifactPath(Artifact.flutterPatchedSdkPath);
}

View file

@ -4,7 +4,6 @@
import 'dart:async';
import 'package:args/command_runner.dart';
import 'package:meta/meta.dart';
import 'package:test/src/executable.dart' as test; // ignore: implementation_imports
@ -29,20 +28,12 @@ Future<int> runTests(
bool startPaused = false,
bool ipv6 = false,
bool machine = false,
bool previewDart2 = true,
String precompiledDillPath,
bool trackWidgetCreation = false,
bool updateGoldens = false,
TestWatcher watcher,
@required int concurrency,
}) 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.
final List<String> testArgs = <String>[];
if (!terminal.supportsColor) {
@ -83,7 +74,6 @@ Future<int> runTests(
machine: machine,
startPaused: startPaused,
serverType: serverType,
previewDart2: previewDart2,
precompiledDillPath: precompiledDillPath,
trackWidgetCreation: trackWidgetCreation,
updateGoldens: updateGoldens,