Skip to content

Generate entrypoints for test bundles on macOS #9018

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Aug 13, 2025

Closes #8973

Ensure test bundles get a main symbol on macOS so swiftpm-testing-helper can kick off tests. We may want to rename this entrypoint to solve some issues with testable executables though.

@owenv
Copy link
Contributor Author

owenv commented Aug 13, 2025

@swift-ci test

@@ -695,6 +695,11 @@ public final class SwiftBuildSystem: SPMBuildCore.BuildSystem {
settings["ARCHS"] = architectures.joined(separator: " ")
}

// When building with the CLI for macOS, test bundles should generate entrypoints for compatibility with swiftpm-testing-helper.
if buildParameters.triple.isMacOSX {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS, or all Darwin?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well we don't support command-line execution of tests on other Apple platforms anyway, so...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Execution doesn't matter, this is about the build. The build system does not assume that the machine/tool building the tests is the one running them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay: we support neither building nor executing tests on iOS using SwiftPM.

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.

[SwiftBuild] swift-build won't run swift-testing tests
3 participants