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, [