Skip to content

Commit fed4026

Browse files
zandersoDBowen33
authored andcommitted
Re-enable dds for flutter drive tests that use DevTools (flutter#153129)
Fixes flutter#153057
1 parent 39e15ef commit fed4026

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

dev/devicelab/lib/framework/utils.dart

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,11 @@ Future<String> eval(
454454
return output.toString().trimRight();
455455
}
456456

457-
List<String> _flutterCommandArgs(String command, List<String> options) {
457+
List<String> _flutterCommandArgs(
458+
String command,
459+
List<String> options, {
460+
bool driveWithDds = false,
461+
}) {
458462
// Commands support the --device-timeout flag.
459463
final Set<String> supportedDeviceTimeoutCommands = <String>{
460464
'attach',
@@ -478,9 +482,9 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
478482
'5',
479483
],
480484

481-
// DDS should be disabled for flutter drive in CI.
485+
// DDS should generally be disabled for flutter drive in CI.
482486
// See https://github.com/flutter/flutter/issues/152684.
483-
if (command == 'drive') '--no-dds',
487+
if (command == 'drive' && !driveWithDds) '--no-dds',
484488

485489
if (command == 'drive' && hostAgent.dumpDirectory != null) ...<String>[
486490
'--screenshot',
@@ -505,10 +509,15 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
505509
Future<int> flutter(String command, {
506510
List<String> options = const <String>[],
507511
bool canFail = false, // as in, whether failures are ok. False means that they are fatal.
512+
bool driveWithDds = false, // `flutter drive` tests should generally have dds disabled.
513+
// The exception is tests that also exercise DevTools, such as
514+
// DevToolsMemoryTest in perf_tests.dart.
508515
Map<String, String>? environment,
509516
String? workingDirectory,
510517
}) async {
511-
final List<String> args = _flutterCommandArgs(command, options);
518+
final List<String> args = _flutterCommandArgs(
519+
command, options, driveWithDds: driveWithDds,
520+
);
512521
final int exitCode = await exec(path.join(flutterDirectory.path, 'bin', 'flutter'), args,
513522
canFail: canFail, environment: environment, workingDirectory: workingDirectory);
514523

dev/devicelab/lib/tasks/perf_tests.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2172,6 +2172,7 @@ class DevToolsMemoryTest {
21722172

21732173
await flutter(
21742174
'drive',
2175+
driveWithDds: true,
21752176
options: <String>[
21762177
'-d', _device.deviceId,
21772178
'--profile',

0 commit comments

Comments
 (0)