Skip to content

Support testing in release mode #252

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

Merged
merged 1 commit into from
Jul 31, 2025
Merged

Conversation

jrflat
Copy link
Contributor

@jrflat jrflat commented Jul 31, 2025

Some tests used internal types/functions that are guarded by #if ENABLE_MOCKING (defined in debug builds), but their code wasn't guarded by #if ENABLE_MOCKING. This made the tests fail to build in release mode.

This PR guards the respective tests/types in #if ENABLE_MOCKING so we can run swift test -c release --enable-testable-imports as suggested in swiftlang/github-workflows#134.

@jrflat
Copy link
Contributor Author

jrflat commented Jul 31, 2025

@swift-ci please test

@jrflat jrflat merged commit 0c11fea into apple:main Jul 31, 2025
29 checks passed
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.

2 participants