Skip to content

Commit e500884

Browse files
authored
Enable Mac ios_platform_tests tests (#6682)
* add 0_4 master * typo fix * update args * fix args * ios runtime update * name change & variables * platform name fix
1 parent b1c457f commit e500884

File tree

3 files changed

+125
-0
lines changed

3 files changed

+125
-0
lines changed

.ci.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,99 @@ targets:
7575
target_file: mac_build_all_plugins.yaml
7676
channel: stable
7777

78+
### iOS tasks ###
79+
# TODO(stuartmorgan): Swap this and ios-build_all_plugins once simulator
80+
# tests are reliable on the ARM infrastructure. See discussion at
81+
# https://github.com/flutter/plugins/pull/5693#issuecomment-1126011089
82+
- name: Mac_x64 ios_platform_tests_1_of_4 master
83+
recipe: plugins/plugins
84+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
85+
timeout: 30
86+
properties:
87+
add_recipes_cq: "true"
88+
version_file: flutter_master.version
89+
target_file: mac_ios_platform_tests.yaml
90+
package_sharding: "--shardIndex 0 --shardCount 4"
91+
92+
- name: Mac_x64 ios_platform_tests_2_of_4 master
93+
recipe: plugins/plugins
94+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
95+
timeout: 30
96+
properties:
97+
add_recipes_cq: "true"
98+
version_file: flutter_master.version
99+
target_file: mac_ios_platform_tests.yaml
100+
package_sharding: "--shardIndex 1 --shardCount 4"
101+
102+
- name: Mac_x64 ios_platform_tests_3_of_4 master
103+
recipe: plugins/plugins
104+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
105+
timeout: 30
106+
properties:
107+
add_recipes_cq: "true"
108+
version_file: flutter_master.version
109+
target_file: mac_ios_platform_tests.yaml
110+
package_sharding: "--shardIndex 2 --shardCount 4"
111+
112+
- name: Mac_x64 ios_platform_tests_4_of_4 master
113+
recipe: plugins/plugins
114+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
115+
timeout: 30
116+
properties:
117+
add_recipes_cq: "true"
118+
version_file: flutter_master.version
119+
target_file: mac_ios_platform_tests.yaml
120+
package_sharding: "--shardIndex 3 --shardCount 4"
121+
122+
# Don't run full platform tests on both channels in pre-submit.
123+
- name: Mac_x64 ios_platform_tests_1_of_4 stable
124+
recipe: plugins/plugins
125+
presubmit: false
126+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
127+
timeout: 30
128+
properties:
129+
channel: stable
130+
add_recipes_cq: "true"
131+
version_file: flutter_stable.version
132+
target_file: mac_ios_platform_tests.yaml
133+
package_sharding: "--shardIndex 0 --shardCount 4"
134+
135+
- name: Mac_x64 ios_platform_tests_2_of_4 stable
136+
recipe: plugins/plugins
137+
presubmit: false
138+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
139+
timeout: 30
140+
properties:
141+
channel: stable
142+
add_recipes_cq: "true"
143+
version_file: flutter_stable.version
144+
target_file: mac_ios_platform_tests.yaml
145+
package_sharding: "--shardIndex 1 --shardCount 4"
146+
147+
- name: Mac_x64 ios_platform_tests_3_of_4 stable
148+
recipe: plugins/plugins
149+
presubmit: false
150+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
151+
timeout: 30
152+
properties:
153+
channel: stable
154+
add_recipes_cq: "true"
155+
version_file: flutter_stable.version
156+
target_file: mac_ios_platform_tests.yaml
157+
package_sharding: "--shardIndex 2 --shardCount 4"
158+
159+
- name: Mac_x64 ios_platform_tests_4_of_4 stable
160+
recipe: plugins/plugins
161+
presubmit: false
162+
bringup: true # New target: https://github.com/flutter/plugins/pull/6682
163+
timeout: 30
164+
properties:
165+
channel: stable
166+
add_recipes_cq: "true"
167+
version_file: flutter_stable.version
168+
target_file: mac_ios_platform_tests.yaml
169+
package_sharding: "--shardIndex 3 --shardCount 4"
170+
78171
- name: Windows win32-platform_tests master
79172
recipe: plugins/plugins
80173
timeout: 30

.ci/scripts/create_simulator.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# Copyright 2013 The Flutter Authors. All rights reserved.
3+
# Use of this source code is governed by a BSD-style license that can be
4+
# found in the LICENSE file.
5+
6+
device=com.apple.CoreSimulator.SimDeviceType.iPhone-11
7+
os=com.apple.CoreSimulator.SimRuntime.iOS-16-0
8+
9+
xcrun simctl list
10+
xcrun simctl create Flutter-iPhone "$device" "$os" | xargs xcrun simctl boot
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
tasks:
2+
- name: create simulator
3+
script: .ci/scripts/create_simulator.sh
4+
- name: build examples
5+
script: script/tool_runner.sh
6+
args: ["build-examples", "--ios"]
7+
- name: xcode analyze
8+
script: script/tool_runner.sh
9+
args: ["xcode-analyze", "--ios"]
10+
- name: xcode analyze deprecation
11+
# Ensure we don't accidentally introduce deprecated code.
12+
script: script/tool_runner.sh
13+
args: ["xcode-analyze", "--ios", "--ios-min-version=13.0"]
14+
- name: native test
15+
script: script/tool_runner.sh
16+
args: ["native-test", "--ios", "--ios-destination", "platform=iOS Simulator,name=iPhone 11,OS=latest"]
17+
- name: drive examples
18+
# `drive-examples` contains integration tests, which changes the UI of the application.
19+
# This UI change sometimes affects `xctest`.
20+
# So we run `drive-examples` after `native-test`; changing the order will result ci failure.
21+
script: script/tool_runner.sh
22+
args: ["drive-examples", "--ios", "--exclude=script/configs/exclude_integration_ios.yaml"]

0 commit comments

Comments
 (0)