[flutter_tool] Adds --enable-impeller flag to the run command (#100835)
This commit is contained in:
@@ -207,6 +207,26 @@ void main() {
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
Pub: () => FakePub(),
|
||||
});
|
||||
|
||||
testUsingContext('--enable-impeller flag propagates to debugging options', () async {
|
||||
final DriveCommand command = DriveCommand(fileSystem: fileSystem, logger: logger, platform: platform);
|
||||
fileSystem.file('lib/main.dart').createSync(recursive: true);
|
||||
fileSystem.file('test_driver/main_test.dart').createSync(recursive: true);
|
||||
fileSystem.file('pubspec.yaml').createSync();
|
||||
|
||||
await expectLater(() => createTestCommandRunner(command).run(<String>[
|
||||
'drive',
|
||||
'--enable-impeller',
|
||||
]), throwsToolExit());
|
||||
|
||||
final DebuggingOptions options = await command.createDebuggingOptions(false);
|
||||
|
||||
expect(options.enableImpeller, true);
|
||||
}, overrides: <Type, Generator>{
|
||||
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
}
|
||||
|
||||
// Unfortunately Device, despite not being immutable, has an `operator ==`.
|
||||
|
||||
@@ -394,6 +394,7 @@ void main() {
|
||||
TestUsageCommand('run', parameters: CustomDimensions.fromMap(<String, String>{
|
||||
'cd3': 'false', 'cd4': 'ios', 'cd22': 'iOS 13',
|
||||
'cd23': 'debug', 'cd18': 'false', 'cd15': 'swift', 'cd31': 'false',
|
||||
'cd56': 'false',
|
||||
})
|
||||
)));
|
||||
}, overrides: <Type, Generator>{
|
||||
@@ -622,6 +623,22 @@ void main() {
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('--enable-impeller flag propagates to debugging options', () async {
|
||||
final RunCommand command = RunCommand();
|
||||
await expectLater(() => createTestCommandRunner(command).run(<String>[
|
||||
'run',
|
||||
'--enable-impeller',
|
||||
]), throwsToolExit());
|
||||
|
||||
final DebuggingOptions options = await command.createDebuggingOptions(false);
|
||||
|
||||
expect(options.enableImpeller, true);
|
||||
}, overrides: <Type, Generator>{
|
||||
Cache: () => Cache.test(processManager: FakeProcessManager.any()),
|
||||
FileSystem: () => MemoryFileSystem.test(),
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
});
|
||||
|
||||
testUsingContext('fails when "--web-launch-url" is not supported', () async {
|
||||
final RunCommand command = RunCommand();
|
||||
await expectLater(
|
||||
|
||||
@@ -521,6 +521,7 @@ void main() {
|
||||
dartEntrypointArgs: <String>['a', 'b'],
|
||||
dartFlags: 'c',
|
||||
deviceVmServicePort: 1234,
|
||||
enableImpeller: true,
|
||||
);
|
||||
final String jsonString = json.encode(original.toJson());
|
||||
final Map<String, dynamic> decoded = castStringKeyedMap(json.decode(jsonString))!;
|
||||
@@ -531,6 +532,7 @@ void main() {
|
||||
expect(deserialized.dartEntrypointArgs, original.dartEntrypointArgs);
|
||||
expect(deserialized.dartFlags, original.dartFlags);
|
||||
expect(deserialized.deviceVmServicePort, original.deviceVmServicePort);
|
||||
expect(deserialized.enableImpeller, original.enableImpeller);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -285,6 +285,7 @@ void main() {
|
||||
'--verbose-logging',
|
||||
'--cache-sksl',
|
||||
'--purge-persistent-cache',
|
||||
'--enable-impeller',
|
||||
].join(' '),
|
||||
], environment: const <String, String>{
|
||||
'PATH': '/usr/bin:null',
|
||||
@@ -332,6 +333,7 @@ void main() {
|
||||
purgePersistentCache: true,
|
||||
verboseSystemLogs: true,
|
||||
nullAssertions: true,
|
||||
enableImpeller: true,
|
||||
),
|
||||
platformArgs: <String, dynamic>{},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user