@@ -32,6 +32,7 @@ function tear_down() {
3232# individual tests (so that they can exercise different dependency structures).
3333function create_minimal_ios_application() {
3434 cat > app/BUILD << EOF
35+ load("@build_bazel_rules_apple//apple:apple_archive.bzl", "apple_archive")
3536load("@build_bazel_rules_apple//apple:ios.bzl",
3637 "ios_application")
3738load("@build_bazel_rules_swift//swift:swift.bzl",
@@ -46,6 +47,11 @@ ios_application(
4647 provisioning_profile = "@build_bazel_rules_apple//test/testdata/provisioning:integration_testing_ios.mobileprovision",
4748 deps = [":lib"],
4849)
50+
51+ apple_archive(
52+ name = "ipa_app",
53+ bundle = ":app",
54+ )
4955EOF
5056
5157 cat > app/AppDelegate.swift << EOF
@@ -96,7 +102,7 @@ swift_library(
96102)
97103EOF
98104
99- do_build ios //app:app || fail " Should build"
105+ do_build ios //app:ipa_app || fail " Should build"
100106 assert_ipa_contains_swift_dylibs_for_device
101107}
102108
@@ -113,7 +119,7 @@ swift_library(
113119)
114120EOF
115121
116- do_build ios //app:app --define=apple.package_swift_support=no \
122+ do_build ios //app:ipa_app --define=apple.package_swift_support=no \
117123 || fail " Should build"
118124 assert_zip_contains " test-bin/app/app.ipa" \
119125 " Payload/app.app/Frameworks/libswiftCore.dylib"
@@ -146,7 +152,7 @@ swift_library(
146152)
147153EOF
148154
149- do_build ios //app:app || fail " Should build"
155+ do_build ios //app:ipa_app || fail " Should build"
150156 assert_ipa_contains_swift_dylibs_for_device
151157}
152158
@@ -162,7 +168,7 @@ swift_library(
162168)
163169EOF
164170
165- do_build ios //app:app --features=asan || fail " Should build"
171+ do_build ios //app:ipa_app --features=asan || fail " Should build"
166172
167173 if is_device_build ios ; then
168174 assert_zip_contains " test-bin/app/app.ipa" \
@@ -187,7 +193,7 @@ swift_library(
187193)
188194EOF
189195
190- do_build ios //app:app --features=tsan \
196+ do_build ios //app:ipa_app --features=tsan \
191197 || fail " Should build"
192198 assert_zip_contains " test-bin/app/app.ipa" \
193199 " Payload/app.app/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib"
@@ -206,7 +212,7 @@ swift_library(
206212)
207213EOF
208214
209- do_build ios //app:app --features=asan || fail " Should build"
215+ do_build ios //app:ipa_app --features=asan || fail " Should build"
210216
211217 if is_device_build ios ; then
212218 assert_zip_contains " test-bin/app/app.ipa" \
232238 # The clang_rt resolution implemented in tools/clangrttool.py requires
233239 # the presence of a clang_rt*.dylib rpath.
234240
235- do_build ios //app:app --features=include_clang_rt --linkopt=-fsanitize=address \
241+ do_build ios //app:ipa_app --features=include_clang_rt --linkopt=-fsanitize=address \
236242 || fail " Should build"
237243
238244 if is_device_build ios ; then
261267 # The clang_rt resolution implemented in tools/clangrttool.py requires
262268 # the presence of a clang_rt*.dylib rpath.
263269
264- do_build ios //app:app --features=include_clang_rt --linkopt=-fsanitize=thread \
270+ do_build ios //app:ipa_app --features=include_clang_rt --linkopt=-fsanitize=thread \
265271 || fail " Should build"
266272 assert_zip_contains " test-bin/app/app.ipa" \
267273 " Payload/app.app/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib"
283289 # The clang_rt resolution implemented in tools/clangrttool.py requires
284290 # the presence of a clang_rt*.dylib rpath.
285291
286- do_build ios //app:app --features=include_clang_rt --linkopt=-fsanitize=undefined \
292+ do_build ios //app:ipa_app --features=include_clang_rt --linkopt=-fsanitize=undefined \
287293 || fail " Should build"
288294
289295 if is_device_build ios ; then
@@ -307,7 +313,7 @@ swift_library(
307313)
308314EOF
309315
310- do_build ios //app:app --features=apple.include_main_thread_checker \
316+ do_build ios //app:ipa_app --features=apple.include_main_thread_checker \
311317 || fail " Should build"
312318
313319 assert_zip_contains " test-bin/app/app.ipa" \
0 commit comments