From 878fe566868013b95225fb0c673cc57a5a956828 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 7 Oct 2024 12:51:36 -0400 Subject: [PATCH 1/3] Try passing debug with config-only --- script/tool/lib/src/native_test_command.dart | 2 +- script/tool/test/native_test_command_test.dart | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/script/tool/lib/src/native_test_command.dart b/script/tool/lib/src/native_test_command.dart index 8875ed29500..a13f850fc25 100644 --- a/script/tool/lib/src/native_test_command.dart +++ b/script/tool/lib/src/native_test_command.dart @@ -317,7 +317,7 @@ this command. if (!project.isConfigured()) { final int exitCode = await processRunner.runAndStream( flutterCommand, - ['build', 'apk', '--config-only'], + ['build', 'apk', '--debug', '--config-only'], workingDir: example.directory, ); if (exitCode != 0) { diff --git a/script/tool/test/native_test_command_test.dart b/script/tool/test/native_test_command_test.dart index cd3569739e2..75dc8eb992c 100644 --- a/script/tool/test/native_test_command_test.dart +++ b/script/tool/test/native_test_command_test.dart @@ -800,7 +800,7 @@ public class FlutterActivityTest { orderedEquals([ ProcessCall( getFlutterCommand(mockPlatform), - const ['build', 'apk', '--config-only'], + const ['build', 'apk', '--debug', '--config-only'], example.path, ), ProcessCall( @@ -1469,12 +1469,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, [ From ba4df0aaf046b4f70b242366078c05d033a5ba73 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 7 Oct 2024 12:52:14 -0400 Subject: [PATCH 2/3] Roll forward --- .ci/flutter_master.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index 594a2c4458a..ff2966c2d4e 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -fa402c8057a11481b834c478cb8374df9bbc0819 +0975e612c04a5ffe1e840908a56cb4e1dd6f6470 From a8abdd6060e5d020452b52a3889183e527d39001 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 7 Oct 2024 13:45:15 -0400 Subject: [PATCH 3/3] Requset all ABIs --- script/tool/lib/src/native_test_command.dart | 13 ++++++++++++- script/tool/test/native_test_command_test.dart | 8 +++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/script/tool/lib/src/native_test_command.dart b/script/tool/lib/src/native_test_command.dart index a13f850fc25..1cd7afb6b4a 100644 --- a/script/tool/lib/src/native_test_command.dart +++ b/script/tool/lib/src/native_test_command.dart @@ -317,7 +317,7 @@ this command. if (!project.isConfigured()) { final int exitCode = await processRunner.runAndStream( flutterCommand, - ['build', 'apk', '--debug', '--config-only'], + ['build', 'apk', '--config-only'], workingDir: example.directory, ); if (exitCode != 0) { @@ -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 75dc8eb992c..02cd5c2c43e 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, ), @@ -800,7 +806,7 @@ public class FlutterActivityTest { orderedEquals([ ProcessCall( getFlutterCommand(mockPlatform), - const ['build', 'apk', '--debug', '--config-only'], + const ['build', 'apk', '--config-only'], example.path, ), ProcessCall(