-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Swiftify] Rework safe interop wrapper tests #84385
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
Open
hnrklssn
wants to merge
11
commits into
swiftlang:main
Choose a base branch
from
hnrklssn:swiftify-test-revamp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@swift-ci please smoke test |
6 similar comments
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test |
7022856
to
d6d2ff4
Compare
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
This helper utility takes a module interface as input, and emits a Swift file importing the module and calling every function in the module. It's intended for testing of safe interop wrappers to make sure they go through the entire pipeline of the compiler instead of succumbing to laziness.
This reworks the safe interop wrapper tests to involve less manual boilerplate, clearly show the exact macro expansion output, while still allowing for low maintenance by being compatible with lit's `--update-tests` flag.
Hiding -enable-experimental-feature in substitutions prevents verify-swift-feature-testing.test-sh from detecting them.
The old Swift runtime in CI emits the following warning when running host Swift code: "swift runtime: unknown backtracing setting 'warnings'". This is an issue for tests that match on an exact output to stderr, so override the SWIFT_BACKTRACE env var for these tests.
Building Foundation seems to be optional in the Linux build script, which makes it tricky to link against outside of Darwin platforms. This removes the dependency on Foundation and calls libc for I/O instead.
RawSpan.init takes an UnsafeRawPointer, so when the underlying function returns an OpaquePointer we need to cast it first. rdar://162091516
48db4f5
to
1298831
Compare
@swift-ci please smoke test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reworks the safe interop wrapper tests to involve less manual
boilerplate, clearly show the exact macro expansion output, while still
allowing for low maintenance by being compatible with lit's
--update-tests
flag.