Skip to content

Commit

Permalink
Move iOS Swift unit tests back to Cirrus (flutter#3221)
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
stuartmorgan authored Feb 17, 2023
1 parent 763d025 commit 3094867
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 2 deletions.
Empty file modified .ci/scripts/build_all_packages_app.sh
100644 → 100755
Empty file.
Empty file modified .ci/scripts/create_all_packages_app.sh
100644 → 100755
Empty file.
Empty file modified .ci/scripts/create_simulator.sh
100644 → 100755
Empty file.
Empty file modified .ci/scripts/dart_unit_tests_win32.sh
100644 → 100755
Empty file.
Empty file modified .ci/scripts/drive_examples_win32.sh
100644 → 100755
Empty file.
Empty file modified .ci/scripts/plugin_tools_tests.sh
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ task:
matrix:
CHANNEL: "master"
CHANNEL: "stable"
# Create an iPhone 13, to match what is available on LUCI, since Pigeon tests
# currently have a hard-coded device.
create_simulator_script:
- xcrun simctl list
- xcrun simctl create "iPhone 13" com.apple.CoreSimulator.SimDeviceType.iPhone-13 com.apple.CoreSimulator.SimRuntime.iOS-16-0
local_tests_script:
# script/configs/linux_only_custom_test.yaml
# Custom tests need Chrome for these packages. (They run in linux-custom_package_tests)
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/tool/run_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Future<void> main(List<String> args) async {
// separation. See https://github.com/flutter/flutter/issues/120231.
const List<String> macOSHostLuciTests = <String>[
iOSObjCUnitTests,
iOSSwiftUnitTests,
// TODO(stuartmorgan): Enable by default once CI issues are solved; see
// https://github.com/flutter/packages/pull/2816.
//iOSObjCIntegrationTests,
Expand All @@ -60,6 +59,7 @@ Future<void> main(List<String> args) async {
// iOSSwiftIntegrationTests,
];
const List<String> macOSHostCirrusTests = <String>[
iOSSwiftUnitTests,
macOSSwiftUnitTests,
macOSSwiftIntegrationTests,
];
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/tool/shared/test_suites.dart
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ Future<int> _runIOSPluginUnitTests(String testPluginPath) async {
return runXcodeBuild(
'$examplePath/ios',
sdk: 'iphonesimulator',
destination: 'platform=iOS Simulator,name=iPhone 8',
destination: 'platform=iOS Simulator,name=iPhone 13',
extraArguments: <String>['test'],
);
}
Expand Down

0 comments on commit 3094867

Please sign in to comment.