mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Re-enable dds for flutter drive tests that use DevTools (#153129)
Fixes https://github.com/flutter/flutter/issues/153057
This commit is contained in:
parent
6c3bb9f307
commit
76107bdf50
@ -454,7 +454,11 @@ Future<String> eval(
|
|||||||
return output.toString().trimRight();
|
return output.toString().trimRight();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> _flutterCommandArgs(String command, List<String> options) {
|
List<String> _flutterCommandArgs(
|
||||||
|
String command,
|
||||||
|
List<String> options, {
|
||||||
|
bool driveWithDds = false,
|
||||||
|
}) {
|
||||||
// Commands support the --device-timeout flag.
|
// Commands support the --device-timeout flag.
|
||||||
final Set<String> supportedDeviceTimeoutCommands = <String>{
|
final Set<String> supportedDeviceTimeoutCommands = <String>{
|
||||||
'attach',
|
'attach',
|
||||||
@ -478,9 +482,9 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
|
|||||||
'5',
|
'5',
|
||||||
],
|
],
|
||||||
|
|
||||||
// DDS should be disabled for flutter drive in CI.
|
// DDS should generally be disabled for flutter drive in CI.
|
||||||
// See https://github.com/flutter/flutter/issues/152684.
|
// See https://github.com/flutter/flutter/issues/152684.
|
||||||
if (command == 'drive') '--no-dds',
|
if (command == 'drive' && !driveWithDds) '--no-dds',
|
||||||
|
|
||||||
if (command == 'drive' && hostAgent.dumpDirectory != null) ...<String>[
|
if (command == 'drive' && hostAgent.dumpDirectory != null) ...<String>[
|
||||||
'--screenshot',
|
'--screenshot',
|
||||||
@ -505,10 +509,15 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
|
|||||||
Future<int> flutter(String command, {
|
Future<int> flutter(String command, {
|
||||||
List<String> options = const <String>[],
|
List<String> options = const <String>[],
|
||||||
bool canFail = false, // as in, whether failures are ok. False means that they are fatal.
|
bool canFail = false, // as in, whether failures are ok. False means that they are fatal.
|
||||||
|
bool driveWithDds = false, // `flutter drive` tests should generally have dds disabled.
|
||||||
|
// The exception is tests that also exercise DevTools, such as
|
||||||
|
// DevToolsMemoryTest in perf_tests.dart.
|
||||||
Map<String, String>? environment,
|
Map<String, String>? environment,
|
||||||
String? workingDirectory,
|
String? workingDirectory,
|
||||||
}) async {
|
}) async {
|
||||||
final List<String> args = _flutterCommandArgs(command, options);
|
final List<String> args = _flutterCommandArgs(
|
||||||
|
command, options, driveWithDds: driveWithDds,
|
||||||
|
);
|
||||||
final int exitCode = await exec(path.join(flutterDirectory.path, 'bin', 'flutter'), args,
|
final int exitCode = await exec(path.join(flutterDirectory.path, 'bin', 'flutter'), args,
|
||||||
canFail: canFail, environment: environment, workingDirectory: workingDirectory);
|
canFail: canFail, environment: environment, workingDirectory: workingDirectory);
|
||||||
|
|
||||||
|
@ -2172,6 +2172,7 @@ class DevToolsMemoryTest {
|
|||||||
|
|
||||||
await flutter(
|
await flutter(
|
||||||
'drive',
|
'drive',
|
||||||
|
driveWithDds: true,
|
||||||
options: <String>[
|
options: <String>[
|
||||||
'-d', _device.deviceId,
|
'-d', _device.deviceId,
|
||||||
'--profile',
|
'--profile',
|
||||||
|
Loading…
Reference in New Issue
Block a user