Skip to content

Commit dd17de7

Browse files
authored
Merge pull request #10656 from apple/add-skip-test-ios32-flag
Add skip test ios32 flag
2 parents d07eb71 + 4d35bd2 commit dd17de7

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

utils/build-script

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ class HostSpecificConfiguration(object):
147147
test = False
148148

149149
name = deployment_target.name
150+
151+
for skip_test_arch in invocation.platforms_archs_to_skip_test:
152+
if deployment_target.name == skip_test_arch.name:
153+
test = False
154+
150155
if build:
151156
# Validation and long tests require building the full standard
152157
# library, whereas the other targets can build a slightly
@@ -499,6 +504,7 @@ class BuildScriptInvocation(object):
499504
self.platforms_to_skip_build.add(StdlibDeploymentTarget.Android)
500505

501506
self.platforms_to_skip_test = set()
507+
self.platforms_archs_to_skip_test = set()
502508
if args.skip_test_linux:
503509
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Linux)
504510
if args.skip_test_freebsd:
@@ -515,6 +521,9 @@ class BuildScriptInvocation(object):
515521
if args.skip_test_ios_simulator:
516522
self.platforms_to_skip_test.add(
517523
StdlibDeploymentTarget.iOSSimulator)
524+
if args.skip_test_ios_32bit_simulator:
525+
self.platforms_archs_to_skip_test.add(
526+
StdlibDeploymentTarget.iOSSimulator.i386)
518527
if args.skip_test_tvos_host:
519528
self.platforms_to_skip_test.add(StdlibDeploymentTarget.AppleTV)
520529
else:
@@ -780,6 +789,8 @@ class BuildScriptInvocation(object):
780789
impl_args += ["--skip-test-ios-host"]
781790
if args.skip_test_ios_simulator:
782791
impl_args += ["--skip-test-ios-simulator"]
792+
if args.skip_test_ios_32bit_simulator:
793+
impl_args += ["--skip-test-ios-32bit-simulator"]
783794
if args.skip_test_tvos_host:
784795
impl_args += ["--skip-test-tvos-host"]
785796
if args.skip_test_tvos_simulator:
@@ -1788,6 +1799,11 @@ iterations with -O",
17881799
"--skip-test-ios-simulator",
17891800
help="skip testing iOS simulator targets",
17901801
action=arguments.action.optional_bool)
1802+
skip_test_group.add_argument(
1803+
"--skip-test-ios-32bit-simulator",
1804+
help="skip testing iOS 32 bit simulator targets",
1805+
action=arguments.action.optional_bool,
1806+
default=True)
17911807
skip_test_group.add_argument(
17921808
"--skip-test-ios-host",
17931809
help="skip testing iOS device targets on the host machine (the phone "

utils/build-script-impl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ KNOWN_SETTINGS=(
142142
skip-test-freebsd "" "set to skip testing Swift stdlibs for FreeBSD"
143143
skip-test-cygwin "" "set to skip testing Swift stdlibs for Cygwin"
144144
skip-test-osx "" "set to skip testing Swift stdlibs for OS X"
145+
skip-test-ios-32bit-simulator "" "set to skip testing Swift stdlibs for iOS 32bit simulators"
145146
skip-test-ios-simulator "" "set to skip testing Swift stdlibs for iOS simulators (i.e. test devices only)"
146147
skip-test-ios-host "" "set to skip testing the host parts of the iOS toolchain"
147148
skip-test-tvos-simulator "" "set to skip testing Swift stdlibs for tvOS simulators (i.e. test devices only)"
@@ -1355,11 +1356,19 @@ function calculate_targets_for_host() {
13551356
build_benchmark_this_target=
13561357
fi
13571358
;;
1358-
iphonesimulator-*)
1359+
iphonesimulator-x86_64)
13591360
swift_sdk="IOS_SIMULATOR"
13601361
build_for_this_target=$(not ${SKIP_BUILD_IOS_SIMULATOR})
13611362
test_this_target=$(not ${SKIP_TEST_IOS_SIMULATOR})
13621363
;;
1364+
iphonesimulator-i386)
1365+
swift_sdk="IOS_SIMULATOR"
1366+
build_for_this_target=$(not ${SKIP_BUILD_IOS_SIMULATOR})
1367+
if [[ "${SKIP_TEST_IOS_SIMULATOR}" == "1" ]] ; then
1368+
SKIP_TEST_IOS_32BIT_SIMULATOR="${SKIP_TEST_IOS_SIMULATOR}"
1369+
fi
1370+
test_this_target=$(not ${SKIP_TEST_IOS_32BIT_SIMULATOR})
1371+
;;
13631372
appletvos-*)
13641373
swift_sdk="TVOS"
13651374
build_for_this_target=$(not ${SKIP_BUILD_TVOS_DEVICE})
@@ -1439,6 +1448,7 @@ function calculate_targets_for_host() {
14391448
test_subset_target_suffix="-only_long"
14401449
fi
14411450
fi
1451+
14421452
SWIFT_TEST_TARGETS+=("check-swift${test_subset_target_suffix}${test_target_suffix}-${stdlib_deployment_target}")
14431453
if [[ $(not ${SKIP_TEST_OPTIMIZED}) && ! -n "${test_host_only}" ]] ; then
14441454
SWIFT_TEST_TARGETS+=("check-swift${test_subset_target_suffix}-optimize-${stdlib_deployment_target}")

utils/swift_build_support/swift_build_support/targets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class StdlibDeploymentTarget(object):
9292

9393
iOS = DarwinPlatform("iphoneos", archs=["armv7", "armv7s", "arm64"],
9494
sdk_name="IOS")
95-
iOSSimulator = DarwinPlatform("iphonesimulator", archs=["x86_64"],
95+
iOSSimulator = DarwinPlatform("iphonesimulator", archs=["i386", "x86_64"],
9696
sdk_name="IOS_SIMULATOR",
9797
is_simulator=True)
9898

0 commit comments

Comments
 (0)