Skip to content

Commit ce6f443

Browse files
nglevinswiple-rules-gardener
authored andcommitted
Update minimum_os_version for XCTest support in Xcode 15.3. Add additional references to common.bzl test targets where it's convenient.
This leaves the "examples" targets alone, as we're assuming that they should be documentation. PiperOrigin-RevId: 611539077
1 parent f0f7bff commit ce6f443

File tree

9 files changed

+44
-41
lines changed

9 files changed

+44
-41
lines changed

test/starlark_tests/apple_static_xcframework_import_tests.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def apple_static_xcframework_import_test_suite(name):
218218
"-[SharedClass doSomethingShared]",
219219
"_OBJC_CLASS_$_SharedClass",
220220
],
221-
macho_load_commands_contain = ["cmd LC_VERSION_MIN_TVOS"],
221+
macho_load_commands_contain = ["cmd LC_BUILD_VERSION", "platform TVOSSIMULATOR"],
222222
tags = [name],
223223
)
224224

test/starlark_tests/common.bzl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ _fixture_tags = [
2323
"notap",
2424
]
2525

26-
# The current baseline for iOS is version 12.0, based on Xcode 15's minimum version
26+
# The current baseline for iOS is version 13.0, based on Xcode 15.3's minimum version for XCTest.
2727
_min_os_ios = struct(
2828
app_intents_support = "16.0",
2929
appclip_support = "14.0",
3030
arm_sim_support = "14.0",
31-
baseline = "12.0",
31+
baseline = "13.0",
3232
oldest_supported = "12.0",
33-
nplus1 = "13.0",
33+
nplus1 = "14.0",
3434
stable_swift_abi = "12.2",
3535
widget_configuration_intents_support = "16.0",
3636
)
@@ -41,14 +41,13 @@ _min_os_macos = struct(
4141
baseline = "10.13",
4242
)
4343

44-
# The current baseline for tvOS is version 12.0, based on Xcode 15's minimum version.
45-
# introduced.
44+
# The current baseline for tvOS is version 13.0, based on Xcode 15.3's minimum version for XCTest.
4645
_min_os_tvos = struct(
4746
app_intents_support = "16.0",
4847
arm_sim_support = "14.0",
49-
baseline = "12.0",
48+
baseline = "13.0",
5049
oldest_supported = "12.0",
51-
nplus1 = "13.0",
50+
nplus1 = "14.0",
5251
stable_swift_abi = "12.2",
5352
)
5453

test/starlark_tests/ios_framework_tests.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,10 @@ def ios_framework_test_suite(name):
628628
name = "{}_app_with_baseline_min_os_and_nplus1_fmwk_produces_error".format(name),
629629
target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_baseline_min_os_and_nplus1_fmwk",
630630
expected_error = """
631-
ERROR: minimum_os_version 13.0 on the framework //test/starlark_tests/targets_under_test/ios:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/ios:app_with_baseline_min_os_and_nplus1_fmwk's minimum_os_version of 12.0
631+
ERROR: minimum_os_version {framework_version} on the framework //test/starlark_tests/targets_under_test/ios:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/ios:app_with_baseline_min_os_and_nplus1_fmwk's minimum_os_version of {app_version}
632632
633633
Please address the minimum_os_version on framework //test/starlark_tests/targets_under_test/ios:fmwk_min_os_nplus1 to match //test/starlark_tests/targets_under_test/ios:app_with_baseline_min_os_and_nplus1_fmwk's minimum_os_version.
634-
""",
634+
""".format(app_version = common.min_os_ios.baseline, framework_version = common.min_os_ios.nplus1),
635635
tags = [name],
636636
)
637637

@@ -641,10 +641,10 @@ Please address the minimum_os_version on framework //test/starlark_tests/targets
641641
name = "{}_app_with_baseline_min_os_and_nplus1_transitive_data_fmwk_produces_error".format(name),
642642
target_under_test = "//test/starlark_tests/targets_under_test/ios:app_with_nplus1_framework_objc_lib_using_data",
643643
expected_error = """
644-
ERROR: minimum_os_version 13.0 on the framework //test/starlark_tests/targets_under_test/ios:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/ios:app_with_nplus1_framework_objc_lib_using_data's minimum_os_version of 12.0
644+
ERROR: minimum_os_version {framework_version} on the framework //test/starlark_tests/targets_under_test/ios:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/ios:app_with_nplus1_framework_objc_lib_using_data's minimum_os_version of {app_version}
645645
646646
Please address the minimum_os_version on framework //test/starlark_tests/targets_under_test/ios:fmwk_min_os_nplus1 to match //test/starlark_tests/targets_under_test/ios:app_with_nplus1_framework_objc_lib_using_data's minimum_os_version.
647-
""",
647+
""".format(app_version = common.min_os_ios.baseline, framework_version = common.min_os_ios.nplus1),
648648
tags = [name],
649649
)
650650

test/starlark_tests/targets_under_test/ios/BUILD

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ ios_application(
10091009
infoplists = [
10101010
"//test/starlark_tests/resources:Info.plist",
10111011
],
1012-
minimum_os_version = common.min_os_ios.baseline,
1012+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
10131013
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
10141014
tags = common.fixture_tags,
10151015
deps = [
@@ -1151,7 +1151,7 @@ ios_extension(
11511151
infoplists = [
11521152
"//test/starlark_tests/resources:Info.plist",
11531153
],
1154-
minimum_os_version = common.min_os_ios.baseline,
1154+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
11551155
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
11561156
tags = common.fixture_tags,
11571157
deps = [
@@ -1647,7 +1647,7 @@ ios_application(
16471647
infoplists = [
16481648
"//test/starlark_tests/resources:Info.plist",
16491649
],
1650-
minimum_os_version = common.min_os_ios.baseline,
1650+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
16511651
tags = common.fixture_tags,
16521652
deps = [
16531653
":dynamic_fmwk_depending_swift_lib",
@@ -1803,7 +1803,7 @@ ios_application(
18031803
infoplists = [
18041804
"//test/starlark_tests/resources:Info.plist",
18051805
],
1806-
minimum_os_version = common.min_os_ios.baseline,
1806+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
18071807
tags = common.fixture_tags,
18081808
deps = [
18091809
":swift_static_without_module_interfaces_fmwk_depending_lib",
@@ -1844,7 +1844,7 @@ ios_application(
18441844
infoplists = [
18451845
"//test/starlark_tests/resources:Info.plist",
18461846
],
1847-
minimum_os_version = common.min_os_ios.baseline,
1847+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
18481848
tags = common.fixture_tags,
18491849
deps = [
18501850
":swift_static_fmwk_depending_swift_lib",
@@ -1966,7 +1966,7 @@ ios_application(
19661966
infoplists = [
19671967
"//test/starlark_tests/resources:Info.plist",
19681968
],
1969-
minimum_os_version = common.min_os_ios.baseline,
1969+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
19701970
tags = common.fixture_tags,
19711971
deps = [
19721972
":dynamic_objc_xcframework_depending_swift_lib",
@@ -2076,7 +2076,7 @@ ios_application(
20762076
infoplists = [
20772077
"//test/starlark_tests/resources:Info.plist",
20782078
],
2079-
minimum_os_version = common.min_os_ios.baseline,
2079+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
20802080
tags = common.fixture_tags,
20812081
deps = [
20822082
":dynamic_swift_xcframework_depending_swift_lib",
@@ -2147,7 +2147,7 @@ ios_application(
21472147
infoplists = [
21482148
"//test/starlark_tests/resources:Info.plist",
21492149
],
2150-
minimum_os_version = common.min_os_ios.baseline,
2150+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
21512151
tags = common.fixture_tags,
21522152
deps = [
21532153
":static_fmwk_depending_swift_lib",
@@ -2232,7 +2232,7 @@ ios_application(
22322232
infoplists = [
22332233
"//test/starlark_tests/resources:Info.plist",
22342234
],
2235-
minimum_os_version = common.min_os_ios.baseline,
2235+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
22362236
tags = common.fixture_tags,
22372237
deps = [
22382238
":swift_static_xcframework_depending_objc_lib",
@@ -2273,7 +2273,7 @@ ios_application(
22732273
infoplists = [
22742274
"//test/starlark_tests/resources:Info.plist",
22752275
],
2276-
minimum_os_version = common.min_os_ios.baseline,
2276+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
22772277
tags = common.fixture_tags,
22782278
deps = [
22792279
":swift_static_xcframework_without_swiftmodule_depending_objc_lib",
@@ -2324,7 +2324,7 @@ ios_application(
23242324
bundle_id = "com.google.example",
23252325
families = ["iphone"],
23262326
infoplists = ["//test/starlark_tests/resources:Info.plist"],
2327-
minimum_os_version = common.min_os_ios.baseline,
2327+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
23282328
tags = common.fixture_tags,
23292329
deps = [
23302330
":static_xcframework_depending_swift_lib",
@@ -2387,7 +2387,7 @@ ios_application(
23872387
bundle_id = "com.google.example",
23882388
families = ["iphone"],
23892389
infoplists = ["//test/starlark_tests/resources:Info.plist"],
2390-
minimum_os_version = common.min_os_ios.baseline,
2390+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
23912391
tags = common.fixture_tags,
23922392
deps = [
23932393
":static_swift_xcframework_depending_swift_lib",

test/starlark_tests/targets_under_test/tvos/BUILD

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ tvos_application(
113113
bundle_id = "com.google.example",
114114
extensions = [":swift_ext"],
115115
infoplists = ["//test/starlark_tests/resources:Info.plist"],
116-
minimum_os_version = common.min_os_tvos.baseline,
116+
minimum_os_version = common.min_os_tvos.oldest_supported, # Before the stable Swift ABI
117117
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
118118
tags = common.fixture_tags,
119119
deps = ["//test/starlark_tests/resources:objc_main_lib"],
@@ -135,7 +135,7 @@ tvos_extension(
135135
bundle_id = "com.google.example.ext",
136136
entitlements = "//test/starlark_tests/resources:entitlements.plist",
137137
infoplists = ["//test/starlark_tests/resources:Info.plist"],
138-
minimum_os_version = common.min_os_tvos.baseline,
138+
minimum_os_version = common.min_os_tvos.oldest_supported, # Before the stable Swift ABI
139139
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
140140
tags = common.fixture_tags,
141141
deps = [
@@ -320,7 +320,7 @@ tvos_application(
320320
infoplists = [
321321
"//test/starlark_tests/resources:Info.plist",
322322
],
323-
minimum_os_version = common.min_os_ios.baseline,
323+
minimum_os_version = common.min_os_tvos.baseline,
324324
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
325325
tags = common.fixture_tags,
326326
deps = [
@@ -1077,7 +1077,7 @@ tvos_application(
10771077
infoplists = [
10781078
"//test/starlark_tests/resources:Info.plist",
10791079
],
1080-
minimum_os_version = common.min_os_tvos.baseline,
1080+
minimum_os_version = common.min_os_tvos.oldest_supported, # Before the stable Swift ABI
10811081
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
10821082
tags = common.fixture_tags,
10831083
deps = [":swift_lib"],
@@ -1089,7 +1089,7 @@ tvos_application(
10891089
infoplists = [
10901090
"//test/starlark_tests/resources:Info.plist",
10911091
],
1092-
minimum_os_version = common.min_os_tvos.baseline,
1092+
minimum_os_version = common.min_os_tvos.oldest_supported, # Before the stable Swift ABI
10931093
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
10941094
tags = common.fixture_tags,
10951095
deps = [":objc_to_swift_lib"],
@@ -1275,7 +1275,7 @@ tvos_application(
12751275
infoplists = [
12761276
"//test/starlark_tests/resources:Info.plist",
12771277
],
1278-
minimum_os_version = common.min_os_ios.baseline,
1278+
minimum_os_version = common.min_os_tvos.baseline,
12791279
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
12801280
tags = common.fixture_tags,
12811281
deps = [
@@ -1291,7 +1291,7 @@ tvos_framework(
12911291
infoplists = [
12921292
"//test/starlark_tests/resources:Info.plist",
12931293
],
1294-
minimum_os_version = common.min_os_ios.nplus1,
1294+
minimum_os_version = common.min_os_tvos.nplus1,
12951295
tags = common.fixture_tags,
12961296
deps = [
12971297
"//test/starlark_tests/resources:basic_bundle_lib",

test/starlark_tests/targets_under_test/watchos/BUILD

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ watchos_application(
312312
infoplists = [
313313
"//test/starlark_tests/resources:WatchosAppInfo.plist",
314314
],
315-
minimum_os_version = "6.0",
315+
minimum_os_version = common.min_os_watchos.baseline,
316316
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
317317
resources = [
318318
"//test/starlark_tests/resources:example_filegroup",
@@ -357,7 +357,7 @@ ios_application(
357357
infoplists = [
358358
"//test/starlark_tests/resources:Info.plist",
359359
],
360-
minimum_os_version = common.min_os_ios.baseline,
360+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
361361
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
362362
tags = common.fixture_tags,
363363
watch_application = ":watchos_app_no_swift",
@@ -391,7 +391,7 @@ ios_application(
391391
infoplists = [
392392
"//test/starlark_tests/resources:Info.plist",
393393
],
394-
minimum_os_version = common.min_os_ios.baseline,
394+
minimum_os_version = common.min_os_ios.oldest_supported, # Before the stable Swift ABI
395395
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
396396
tags = common.fixture_tags,
397397
watch_application = ":watchos_app_swift",
@@ -503,7 +503,7 @@ watchos_application(
503503
infoplists = [
504504
"//test/starlark_tests/resources:WatchosAppInfo.plist",
505505
],
506-
minimum_os_version = "6.0",
506+
minimum_os_version = common.min_os_watchos.stable_swift_abi,
507507
provisioning_profile = "//test/testdata/provisioning:integration_testing_ios.mobileprovision",
508508
tags = common.fixture_tags,
509509
)

test/starlark_tests/tvos_framework_tests.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ def tvos_framework_test_suite(name):
349349
name = "{}_app_with_baseline_min_os_and_nplus1_fmwk_produces_error".format(name),
350350
target_under_test = "//test/starlark_tests/targets_under_test/tvos:app_with_baseline_min_os_and_nplus1_fmwk",
351351
expected_error = """
352-
ERROR: minimum_os_version 13.0 on the framework //test/starlark_tests/targets_under_test/tvos:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/tvos:app_with_baseline_min_os_and_nplus1_fmwk's minimum_os_version of 12.0
352+
ERROR: minimum_os_version {framework_version} on the framework //test/starlark_tests/targets_under_test/tvos:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/tvos:app_with_baseline_min_os_and_nplus1_fmwk's minimum_os_version of {app_version}
353353
354354
Please address the minimum_os_version on framework //test/starlark_tests/targets_under_test/tvos:fmwk_min_os_nplus1 to match //test/starlark_tests/targets_under_test/tvos:app_with_baseline_min_os_and_nplus1_fmwk's minimum_os_version.
355-
""",
355+
""".format(app_version = common.min_os_tvos.baseline, framework_version = common.min_os_tvos.nplus1),
356356
tags = [name],
357357
)
358358

@@ -362,10 +362,10 @@ Please address the minimum_os_version on framework //test/starlark_tests/targets
362362
name = "{}_app_with_baseline_min_os_and_nplus1_transitive_data_fmwk_produces_error".format(name),
363363
target_under_test = "//test/starlark_tests/targets_under_test/tvos:app_with_nplus1_framework_objc_lib_using_data",
364364
expected_error = """
365-
ERROR: minimum_os_version 13.0 on the framework //test/starlark_tests/targets_under_test/tvos:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/tvos:app_with_nplus1_framework_objc_lib_using_data's minimum_os_version of 12.0
365+
ERROR: minimum_os_version {framework_version} on the framework //test/starlark_tests/targets_under_test/tvos:fmwk_min_os_nplus1 is too high compared to //test/starlark_tests/targets_under_test/tvos:app_with_nplus1_framework_objc_lib_using_data's minimum_os_version of {app_version}
366366
367367
Please address the minimum_os_version on framework //test/starlark_tests/targets_under_test/tvos:fmwk_min_os_nplus1 to match //test/starlark_tests/targets_under_test/tvos:app_with_nplus1_framework_objc_lib_using_data's minimum_os_version.
368-
""",
368+
""".format(app_version = common.min_os_tvos.baseline, framework_version = common.min_os_tvos.nplus1),
369369
tags = [name],
370370
)
371371

test/starlark_tests/watchos_application_swift_tests.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def watchos_application_swift_test_suite(name):
121121
"bundle/Payload/companion.app/Watch/app.app/app",
122122
"bundle/Payload/companion.app/Watch/app.app/PlugIns/ext.appex/Info.plist",
123123
"bundle/Payload/companion.app/Watch/app.app/PlugIns/ext.appex/ext",
124-
"bundle/SwiftSupport/iphoneos/libswiftCore.dylib",
124+
"bundle/SwiftSupport/watchos/libswiftCore.dylib",
125125
"bundle/WatchKitSupport2/WK",
126126
"dossier/manifest.json",
127127
],

test/testdata/binaries/BUILD

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ load(
22
"//apple:apple_binary.bzl",
33
"apple_binary",
44
)
5+
load(
6+
"//test/starlark_tests:common.bzl",
7+
"common",
8+
)
59

610
package(
711
default_visibility = ["//test:__subpackages__"],
@@ -12,7 +16,7 @@ licenses(["notice"])
1216
apple_binary(
1317
name = "empty_tvos_dylib",
1418
binary_type = "dylib",
15-
minimum_os_version = "12.0",
19+
minimum_os_version = common.min_os_tvos.baseline,
1620
platform_type = "tvos",
1721
deps = [":dummy_lib"],
1822
)

0 commit comments

Comments
 (0)