Skip to content

Commit 332261a

Browse files
nglevinluispadron
authored andcommitted
Update tests to cover watchOS device arm64, and to test the results of dSYM bundles within tree artifacts at test execution time rather than just analysis time.
Cherry-pick: 39aeac6
1 parent e53168e commit 332261a

7 files changed

Lines changed: 115 additions & 1 deletion

test/starlark_tests/apple_xcframework_tests.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,25 @@ def apple_xcframework_test_suite(name):
377377
tags = [name],
378378
)
379379

380+
directory_test(
381+
name = "{}_dsym_directory_test".format(name),
382+
apple_generate_dsym = True,
383+
build_type = "device",
384+
compilation_mode = "opt",
385+
target_under_test = "//test/starlark_tests/targets_under_test/apple:ios_dynamic_lipoed_xcframework",
386+
expected_directories = {
387+
"ios_dynamic_lipoed_xcframework_ios_device.framework.dSYM": [
388+
"Contents/Resources/DWARF/ios_dynamic_lipoed_xcframework_bin",
389+
"Contents/Info.plist",
390+
],
391+
"ios_dynamic_lipoed_xcframework_ios_simulator.framework.dSYM": [
392+
"Contents/Resources/DWARF/ios_dynamic_lipoed_xcframework_bin",
393+
"Contents/Info.plist",
394+
],
395+
},
396+
tags = [name],
397+
)
398+
380399
linkmap_test(
381400
name = "{}_device_linkmap_test".format(name),
382401
target_under_test = "//test/starlark_tests/targets_under_test/apple:ios_dynamic_xcframework",

test/starlark_tests/ios_application_tests.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ load(
5454
"apple_symbols_file_test",
5555
"archive_contents_test",
5656
)
57+
load(
58+
"//test/starlark_tests/rules:directory_test.bzl",
59+
"directory_test",
60+
)
5761
load(
5862
"//test/starlark_tests/rules:entitlements_contents_test.bzl",
5963
"entitlements_contents_test",
@@ -831,6 +835,21 @@ def ios_application_test_suite(name):
831835
tags = [name],
832836
)
833837

838+
directory_test(
839+
name = "{}_dsym_directory_test".format(name),
840+
apple_generate_dsym = True,
841+
build_type = "device",
842+
compilation_mode = "opt",
843+
target_under_test = "//test/starlark_tests/targets_under_test/ios:app",
844+
expected_directories = {
845+
"app.app.dSYM": [
846+
"Contents/Resources/DWARF/app_bin",
847+
"Contents/Info.plist",
848+
],
849+
},
850+
tags = [name],
851+
)
852+
834853
output_group_zip_contents_test(
835854
name = "{}_has_combined_zip_output_group".format(name),
836855
build_type = "device",

test/starlark_tests/macos_application_tests.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ load(
4646
"apple_symbols_file_test",
4747
"archive_contents_test",
4848
)
49+
load(
50+
"//test/starlark_tests/rules:directory_test.bzl",
51+
"directory_test",
52+
)
4953
load(
5054
"//test/starlark_tests/rules:infoplist_contents_test.bzl",
5155
"infoplist_contents_test",
@@ -453,6 +457,21 @@ def macos_application_test_suite(name):
453457
tags = [name],
454458
)
455459

460+
directory_test(
461+
name = "{}_dsym_directory_test".format(name),
462+
apple_generate_dsym = True,
463+
build_type = "device",
464+
compilation_mode = "opt",
465+
target_under_test = "//test/starlark_tests/targets_under_test/macos:app",
466+
expected_directories = {
467+
"app.app.dSYM": [
468+
"Contents/Resources/DWARF/app_bin",
469+
"Contents/Info.plist",
470+
],
471+
},
472+
tags = [name],
473+
)
474+
456475
infoplist_contents_test(
457476
name = "{}_plist_test".format(name),
458477
target_under_test = "//test/starlark_tests/targets_under_test/macos:app",

test/starlark_tests/rules/apple_verification_test.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Internal Error: A verification test should only specify `apple_platforms` or `cp
103103
output_dictionary.update({
104104
"//command_line_option:ios_multi_cpus": "arm64,arm64e",
105105
"//command_line_option:tvos_cpus": "arm64",
106-
"//command_line_option:watchos_cpus": "arm64_32,armv7k",
106+
"//command_line_option:watchos_cpus": "device_arm64,arm64_32,armv7k",
107107
})
108108

109109
if _supports_visionos:

test/starlark_tests/tvos_application_tests.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ load(
4040
"//test/starlark_tests/rules:common_verification_tests.bzl",
4141
"archive_contents_test",
4242
)
43+
load(
44+
"//test/starlark_tests/rules:directory_test.bzl",
45+
"directory_test",
46+
)
4347
load(
4448
"//test/starlark_tests/rules:infoplist_contents_test.bzl",
4549
"infoplist_contents_test",
@@ -269,6 +273,21 @@ def tvos_application_test_suite(name):
269273
tags = [name],
270274
)
271275

276+
directory_test(
277+
name = "{}_dsym_directory_test".format(name),
278+
apple_generate_dsym = True,
279+
build_type = "device",
280+
compilation_mode = "opt",
281+
target_under_test = "//test/starlark_tests/targets_under_test/tvos:app",
282+
expected_directories = {
283+
"app.app.dSYM": [
284+
"Contents/Resources/DWARF/app_bin",
285+
"Contents/Info.plist",
286+
],
287+
},
288+
tags = [name],
289+
)
290+
272291
infoplist_contents_test(
273292
name = "{}_plist_test".format(name),
274293
target_under_test = "//test/starlark_tests/targets_under_test/tvos:app",

test/starlark_tests/visionos_application_tests.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ load(
4040
"//test/starlark_tests/rules:common_verification_tests.bzl",
4141
"archive_contents_test",
4242
)
43+
load(
44+
"//test/starlark_tests/rules:directory_test.bzl",
45+
"directory_test",
46+
)
4347
load(
4448
"//test/starlark_tests/rules:infoplist_contents_test.bzl",
4549
"infoplist_contents_test",
@@ -220,6 +224,21 @@ def visionos_application_test_suite(name):
220224
],
221225
)
222226

227+
directory_test(
228+
name = "{}_dsym_directory_test".format(name),
229+
apple_generate_dsym = True,
230+
build_type = "device",
231+
compilation_mode = "opt",
232+
target_under_test = "//test/starlark_tests/targets_under_test/visionos:app",
233+
expected_directories = {
234+
"app.app.dSYM": [
235+
"Contents/Resources/DWARF/app_bin",
236+
"Contents/Info.plist",
237+
],
238+
},
239+
tags = [name],
240+
)
241+
223242
infoplist_contents_test(
224243
name = "{}_plist_test".format(name),
225244
target_under_test = "//test/starlark_tests/targets_under_test/visionos:app",

test/starlark_tests/watchos_single_target_application_tests.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ load(
3535
"archive_contents_test",
3636
"binary_contents_test",
3737
)
38+
load(
39+
"//test/starlark_tests/rules:directory_test.bzl",
40+
"directory_test",
41+
)
3842
load(
3943
"//test/starlark_tests/rules:infoplist_contents_test.bzl",
4044
"infoplist_contents_test",
@@ -287,6 +291,21 @@ delegate is referenced in the single-target `watchos_application`'s `deps`.
287291
tags = [name],
288292
)
289293

294+
directory_test(
295+
name = "{}_dsym_directory_test".format(name),
296+
apple_generate_dsym = True,
297+
build_type = "device",
298+
compilation_mode = "opt",
299+
target_under_test = "//test/starlark_tests/targets_under_test/watchos:single_target_app",
300+
expected_directories = {
301+
"single_target_app.app.dSYM": [
302+
"Contents/Resources/DWARF/single_target_app_bin",
303+
"Contents/Info.plist",
304+
],
305+
},
306+
tags = [name],
307+
)
308+
290309
native.test_suite(
291310
name = name,
292311
tags = [

0 commit comments

Comments
 (0)