-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Run stable ABI tests on all Apple platforms #24833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run stable ABI tests on all Apple platforms #24833
Conversation
@swift-ci Please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. I'd suggest explicitly using %target-pre-stable-abi-triple
more often, though—even though that's our default in the normal configurations, I'm not sure it is for the Apple-internal bots that test Swift-in-the-OS. @Rostepher, @clackary, do you happen to know?
test/lit.cfg
Outdated
@@ -568,6 +568,44 @@ if config.benchmark_o != 'Benchmark_O': | |||
# Add substitutions for the run target triple, CPU, OS, and pointer size. | |||
config.substitutions.append(('%target-triple', config.variant_triple)) | |||
|
|||
if platform.system() == 'Darwin': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird to check this via the host rather than the target. run_vendor == 'apple'
should be good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable.
stable_version) | ||
else: | ||
config.pre_stable_abi_triple = config.variant_triple | ||
config.stable_abi_triple = config.variant_triple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should config.stable_abi_triple
be NO_STABLE_ABI
or something on other platforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to leave the possibility of writing tests that use stable ABI on Apple platforms but don't care elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, okay.
4f37677
to
d3c96c2
Compare
@jrose-apple Please take a look. I added |
@swift-ci Please test |
Build failed |
Build failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tentatively looks all right to me, but I'd be vigilant for issues in our internal CI while this merges through.
# iOS 12.2 does not support 32-bit targets, so we cannot run tests that | ||
# want to deploy to an iOS that has Swift in the OS. | ||
if run_os == 'ios' and run_ptrsize == '32': | ||
pre_stable_version = '10' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10.3, really, but this is fine too.
d3c96c2
to
1f95aeb
Compare
@swift-ci Please test |
Build failed |
Build failed |
A number of tests exercise features only available in Apple OSes that shipped with Swift 5.0 in the OS; this includes the following versions: - macOS 10.14.4 - iOS 12.2 - tvOS 12.2 - watchOS 5.2 Previously these tests were restricted to running on macOS only, with an explicit -target x86_64-apple-macosx10.14.4. To get better test coverage, add a new %target-stable-abi-triple substitution which expands to a triple with the correct OS version on all Apple platforms. On non-Apple platforms, this is the same as %target-variant-triple, but for now any test that uses this exercises Apple platform features anyway. One caveat is that since iOS 12.2 does not have a 32-bit slice, we have to skip any tests that use -target %target-stable-abi-triple on this platform. A new swift_stable_abi feature flag can be tested with 'REQUIRES: swift_stable_abi'. To get maximum test coverage, I split off a 'stable_abi' version of a few tests that build with both an old and new deployment target. This allows the old deployment target case to still be tested on 32-bit iOS.
1f95aeb
to
5d66bb8
Compare
@swift-ci Please test |
Build failed |
Build failed |
A number of tests exercise features only available in Apple OSes that
shipped with Swift 5.0 in the OS; this includes the following versions:
Previously these tests were restricted to running on macOS only, with
an explicit -target x86_64-apple-macosx10.14.4. To get better test
coverage, add a new %target-stable-abi-triple substitution which
expands to a triple with the correct OS version on all Apple platforms.
On non-Apple platforms, this is the same as %target-variant-triple,
but for now any test that uses this exercises Apple platform features
anyway.
One caveat is that since iOS 12.2 does not have a 32-bit slice, we
have to skip any tests that use -target %target-stable-abi-triple
on this platform. A new swift_stable_abi feature flag can be tested
with 'REQUIRES: swift_stable_abi'. To get maximum test coverage,
I split off a 'stable_abi' version of a few tests that build with both
an old and new deployment target. This allows the old deployment
target case to still be tested on 32-bit iOS.