From cebc06cbd78303e4d7b4792277b46b59ddd8b521 Mon Sep 17 00:00:00 2001 From: engine-flutter-autoroll Date: Tue, 8 Oct 2024 08:14:04 -0400 Subject: [PATCH] Manual roll Flutter from 6bba08cbcc51 to 0975e612c04a (1 revision) (#7814) Manual roll requested by stuartmorgan@google.com https://github.com/flutter/flutter/compare/6bba08cbcc51...0975e612c04a 2024-10-01 51940183+Sameri11@users.noreply.github.com [tool][android] Allow --target-platform work properly with --debug mode (flutter/flutter#154476) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC camillesimon@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md --------- Co-authored-by: Stuart Morgan --- .ci/flutter_master.version | 2 +- script/tool/lib/src/native_test_command.dart | 11 +++++++++++ script/tool/test/native_test_command_test.dart | 14 ++++++++++---- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index 1ba226f3b49f..ff2966c2d4ec 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -6bba08cbcc516b599602673686813c6f3aa9a372 +0975e612c04a5ffe1e840908a56cb4e1dd6f6470 diff --git a/script/tool/lib/src/native_test_command.dart b/script/tool/lib/src/native_test_command.dart index 8875ed29500a..1cd7afb6b4ae 100644 --- a/script/tool/lib/src/native_test_command.dart +++ b/script/tool/lib/src/native_test_command.dart @@ -367,10 +367,21 @@ this command. 'notAnnotation=io.flutter.plugins.DartIntegrationTest'; print('Running integration tests...'); + // Explicitly request all ABIs, as Flutter would if being called + // without a specific target (see + // https://github.com/flutter/flutter/pull/154476) to ensure it can + // run on any architecture emulator. + const List abis = [ + 'android-arm', + 'android-arm64', + 'android-x64', + 'android-x86' + ]; final int exitCode = await project.runCommand( 'app:connectedAndroidTest', arguments: [ '-Pandroid.testInstrumentationRunnerArguments.$filter', + '-Ptarget-platform=${abis.join(',')}', ], ); if (exitCode != 0) { diff --git a/script/tool/test/native_test_command_test.dart b/script/tool/test/native_test_command_test.dart index cd3569739e22..02cd5c2c43ea 100644 --- a/script/tool/test/native_test_command_test.dart +++ b/script/tool/test/native_test_command_test.dart @@ -20,6 +20,9 @@ import 'package:test/test.dart'; import 'mocks.dart'; import 'util.dart'; +const String _allAbiFlag = + '-Ptarget-platform=android-arm,android-arm64,android-x64,android-x86'; + const String _androidIntegrationTestFilter = '-Pandroid.testInstrumentationRunnerArguments.' 'notAnnotation=io.flutter.plugins.DartIntegrationTest'; @@ -563,6 +566,7 @@ void main() { const [ 'app:connectedAndroidTest', _androidIntegrationTestFilter, + _allAbiFlag, ], androidFolder.path, ), @@ -697,6 +701,7 @@ public class FlutterActivityTest { const [ 'app:connectedAndroidTest', _androidIntegrationTestFilter, + _allAbiFlag, ], androidFolder.path, ), @@ -734,6 +739,7 @@ public class FlutterActivityTest { const [ 'app:connectedAndroidTest', _androidIntegrationTestFilter, + _allAbiFlag, ], androidFolder.path, ), @@ -1469,12 +1475,12 @@ public class FlutterActivityTest { processRunner.mockProcessesForExecutable['xcrun'] = [ getMockXcodebuildListProcess( ['RunnerTests', 'RunnerUITests']), // iOS list - FakeProcessInfo( - MockProcess(), ['xcodebuild', 'clean', 'test']), // iOS run + FakeProcessInfo(MockProcess(), + ['xcodebuild', 'clean', 'test']), // iOS run getMockXcodebuildListProcess( ['RunnerTests', 'RunnerUITests']), // macOS list - FakeProcessInfo( - MockProcess(), ['xcodebuild', 'clean', 'test']), // macOS run + FakeProcessInfo(MockProcess(), + ['xcodebuild', 'clean', 'test']), // macOS run ]; final List output = await runCapturingPrint(runner, [