@@ -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) {
505509Future <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
0 commit comments