Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable dds for flutter drive tests that use DevTools #153129

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Re-enable dds for flutter drive tests that use DevTools
  • Loading branch information
zanderso committed Aug 8, 2024
commit 8ddd8ae17729b4c8b9037c32f69384f7aa871377
17 changes: 13 additions & 4 deletions dev/devicelab/lib/framework/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 454,11 @@ Future<String> eval(
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.
final Set<String> supportedDeviceTimeoutCommands = <String>{
'attach',
Expand All @@ -478,9 482,9 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
'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.
if (command == 'drive') '--no-dds',
if (command == 'drive' && !driveWithDds) '--no-dds',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to pipe driveWithDds into this method though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only spot it needs to go is where it's added in perf_tests.dart below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh derp. Reading fail.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


if (command == 'drive' && hostAgent.dumpDirectory != null) ...<String>[
'--screenshot',
Expand All @@ -505,10 509,15 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
Future<int> flutter(String command, {
List<String> options = const <String>[],
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,
String? workingDirectory,
}) 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,
canFail: canFail, environment: environment, workingDirectory: workingDirectory);

Expand Down
1 change: 1 addition & 0 deletions dev/devicelab/lib/tasks/perf_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2160,6 2160,7 @@ class DevToolsMemoryTest {

await flutter(
'drive',
driveWithDds: true,
options: <String>[
'-d', _device.deviceId,
'--profile',
Expand Down