@@ -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"
@@ -148,7 +154,7 @@ swift_library(
148154)
149155EOF
150156
151- do_build ios //app:app || fail " Should build"
157+ do_build ios //app:ipa_app || fail " Should build"
152158 assert_ipa_contains_swift_dylibs_for_device
153159}
154160
@@ -164,7 +170,7 @@ swift_library(
164170)
165171EOF
166172
167- do_build ios //app:app --features=asan || fail " Should build"
173+ do_build ios //app:ipa_app --features=asan || fail " Should build"
168174
169175 if is_device_build ios ; then
170176 assert_zip_contains " test-bin/app/app.ipa" \
@@ -189,7 +195,7 @@ swift_library(
189195)
190196EOF
191197
192- do_build ios //app:app --features=tsan \
198+ do_build ios //app:ipa_app --features=tsan \
193199 || fail " Should build"
194200 assert_zip_contains " test-bin/app/app.ipa" \
195201 " Payload/app.app/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib"
@@ -208,7 +214,7 @@ swift_library(
208214)
209215EOF
210216
211- do_build ios //app:app --features=asan || fail " Should build"
217+ do_build ios //app:ipa_app --features=asan || fail " Should build"
212218
213219 if is_device_build ios ; then
214220 assert_zip_contains " test-bin/app/app.ipa" \
234240 # The clang_rt resolution implemented in tools/clangrttool.py requires
235241 # the presence of a clang_rt*.dylib rpath.
236242
237- do_build ios //app:app --features=include_clang_rt --linkopt=-fsanitize=address \
243+ do_build ios //app:ipa_app --features=include_clang_rt --linkopt=-fsanitize=address \
238244 || fail " Should build"
239245
240246 if is_device_build ios ; then
263269 # The clang_rt resolution implemented in tools/clangrttool.py requires
264270 # the presence of a clang_rt*.dylib rpath.
265271
266- do_build ios //app:app --features=include_clang_rt --linkopt=-fsanitize=thread \
272+ do_build ios //app:ipa_app --features=include_clang_rt --linkopt=-fsanitize=thread \
267273 || fail " Should build"
268274 assert_zip_contains " test-bin/app/app.ipa" \
269275 " Payload/app.app/Frameworks/libclang_rt.tsan_iossim_dynamic.dylib"
285291 # The clang_rt resolution implemented in tools/clangrttool.py requires
286292 # the presence of a clang_rt*.dylib rpath.
287293
288- do_build ios //app:app --features=include_clang_rt --linkopt=-fsanitize=undefined \
294+ do_build ios //app:ipa_app --features=include_clang_rt --linkopt=-fsanitize=undefined \
289295 || fail " Should build"
290296
291297 if is_device_build ios ; then
@@ -309,7 +315,7 @@ swift_library(
309315)
310316EOF
311317
312- do_build ios //app:app --features=apple.include_main_thread_checker \
318+ do_build ios //app:ipa_app --features=apple.include_main_thread_checker \
313319 || fail " Should build"
314320
315321 assert_zip_contains " test-bin/app/app.ipa" \
0 commit comments