Skip to content

Commit 3094867

Browse files
Move iOS Swift unit tests back to Cirrus (flutter#3221)
They are hanging frequently on LUCI now, even though they used to (at least mostly) work. Updates the simulator to use one available on the current LUCI machines, and adds a step to Cirrus to ensure the creation of a matching simulator so that the script works on both. (Currently it appears that Cirrus by default only has iPhone 14, which LUCI doesn't have by default.)
1 parent 763d025 commit 3094867

File tree

9 files changed

+7
-2
lines changed

9 files changed

+7
-2
lines changed

.ci/scripts/build_all_packages_app.sh

100644100755
File mode changed.

.ci/scripts/create_all_packages_app.sh

100644100755
File mode changed.

.ci/scripts/create_simulator.sh

100644100755
File mode changed.

.ci/scripts/dart_unit_tests_win32.sh

100644100755
File mode changed.

.ci/scripts/drive_examples_win32.sh

100644100755
File mode changed.

.ci/scripts/plugin_tools_tests.sh

100644100755
File mode changed.

.cirrus.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,11 @@ task:
340340
matrix:
341341
CHANNEL: "master"
342342
CHANNEL: "stable"
343+
# Create an iPhone 13, to match what is available on LUCI, since Pigeon tests
344+
# currently have a hard-coded device.
345+
create_simulator_script:
346+
- xcrun simctl list
347+
- xcrun simctl create "iPhone 13" com.apple.CoreSimulator.SimDeviceType.iPhone-13 com.apple.CoreSimulator.SimRuntime.iOS-16-0
343348
local_tests_script:
344349
# script/configs/linux_only_custom_test.yaml
345350
# Custom tests need Chrome for these packages. (They run in linux-custom_package_tests)

packages/pigeon/tool/run_tests.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Future<void> main(List<String> args) async {
4949
// separation. See https://github.com/flutter/flutter/issues/120231.
5050
const List<String> macOSHostLuciTests = <String>[
5151
iOSObjCUnitTests,
52-
iOSSwiftUnitTests,
5352
// TODO(stuartmorgan): Enable by default once CI issues are solved; see
5453
// https://github.com/flutter/packages/pull/2816.
5554
//iOSObjCIntegrationTests,
@@ -60,6 +59,7 @@ Future<void> main(List<String> args) async {
6059
// iOSSwiftIntegrationTests,
6160
];
6261
const List<String> macOSHostCirrusTests = <String>[
62+
iOSSwiftUnitTests,
6363
macOSSwiftUnitTests,
6464
macOSSwiftIntegrationTests,
6565
];

packages/pigeon/tool/shared/test_suites.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Future<int> _runIOSPluginUnitTests(String testPluginPath) async {
303303
return runXcodeBuild(
304304
'$examplePath/ios',
305305
sdk: 'iphonesimulator',
306-
destination: 'platform=iOS Simulator,name=iPhone 8',
306+
destination: 'platform=iOS Simulator,name=iPhone 13',
307307
extraArguments: <String>['test'],
308308
);
309309
}

0 commit comments

Comments
 (0)