@@ -454,7 +454,11 @@ Future<String> eval(
454
454
return output.toString ().trimRight ();
455
455
}
456
456
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
+ }) {
458
462
// Commands support the --device-timeout flag.
459
463
final Set <String > supportedDeviceTimeoutCommands = < String > {
460
464
'attach' ,
@@ -478,9 +482,9 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
478
482
'5' ,
479
483
],
480
484
481
- // DDS should be disabled for flutter drive in CI.
485
+ // DDS should generally be disabled for flutter drive in CI.
482
486
// See https://github.com/flutter/flutter/issues/152684.
483
- if (command == 'drive' ) '--no-dds' ,
487
+ if (command == 'drive' && ! driveWithDds ) '--no-dds' ,
484
488
485
489
if (command == 'drive' && hostAgent.dumpDirectory != null ) ...< String > [
486
490
'--screenshot' ,
@@ -505,10 +509,15 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
505
509
Future <int > flutter (String command, {
506
510
List <String > options = const < String > [],
507
511
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.
508
515
Map <String , String >? environment,
509
516
String ? workingDirectory,
510
517
}) async {
511
- final List <String > args = _flutterCommandArgs (command, options);
518
+ final List <String > args = _flutterCommandArgs (
519
+ command, options, driveWithDds: driveWithDds,
520
+ );
512
521
final int exitCode = await exec (path.join (flutterDirectory.path, 'bin' , 'flutter' ), args,
513
522
canFail: canFail, environment: environment, workingDirectory: workingDirectory);
514
523
0 commit comments