Skip to content

Conversation

hnrklssn
Copy link
Contributor

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.

@hnrklssn
Copy link
Contributor Author

@swift-ci please smoke test

6 similar comments
@hnrklssn
Copy link
Contributor Author

@swift-ci please smoke test

@hnrklssn
Copy link
Contributor Author

@swift-ci please smoke test

@hnrklssn
Copy link
Contributor Author

@swift-ci please smoke test

@hnrklssn
Copy link
Contributor Author

@swift-ci please smoke test

@hnrklssn
Copy link
Contributor Author

@swift-ci please smoke test

@hnrklssn
Copy link
Contributor Author

@swift-ci please smoke test

@hnrklssn hnrklssn force-pushed the swiftify-test-revamp branch from 7022856 to d6d2ff4 Compare October 6, 2025 15:17
@hnrklssn
Copy link
Contributor Author

hnrklssn commented Oct 6, 2025

@swift-ci please smoke test

1 similar comment
@hnrklssn
Copy link
Contributor Author

hnrklssn commented Oct 7, 2025

@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
@hnrklssn hnrklssn force-pushed the swiftify-test-revamp branch from 48db4f5 to 1298831 Compare October 7, 2025 04:55
@hnrklssn
Copy link
Contributor Author

hnrklssn commented Oct 8, 2025

@swift-ci please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant