-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
@swift-ci test |
} | ||
|
||
// When building with the CLI for macOS, test bundles should generate entrypoints for compatibility with swiftpm-testing-helper. | ||
if buildParameters.triple.isMacOSX { |
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.
macOS, or all 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.
Well we don't support command-line execution of tests on other Apple platforms anyway, so...
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.
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.
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.
Okay: we support neither building nor executing tests on iOS using SwiftPM.
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 good, though it does appears we have regressed in some areas.
627f0ba
to
b19a7f1
Compare
@swift-ci test |
@swift-ci test Windows |
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 understand the PR is in draft, but I have a comment, which may or may not be applicable :)
b19a7f1
to
86ad587
Compare
@swift-ci test |
@swift-ci test Windows |
@swift-ci test self hosted |
86ad587
to
dc198e1
Compare
@swift-ci test self hosted |
dc198e1
to
2a9d838
Compare
@swift-ci test |
1 similar comment
@swift-ci test |
One remaining text failure should be fixed by #9115 |
@swift-ci test self hosted |
if let toolchainID = try await session.lookupToolchain(at: buildParameters.toolchain.toolchainDir.pathString) { | ||
settings["TOOLCHAINS"] = "\(toolchainID.rawValue) $(inherited)" | ||
} else { | ||
// FIXME: This list of overrides is incomplete. |
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.
issue: Do we have a GitHub issue tracking this FIXME
? If so, can we add it as a code comment?
} | ||
} when: { | ||
buildSystem == .swiftbuild | ||
buildSystem == .swiftbuild && ProcessInfo.hostOperatingSystem != .macOS |
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.
issue (possibly blocking): Do we know why this test failed on Linux and Windows? Could we add an issue trait to the test to track it?
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.
This patch fixed it on macOS, linux/windows now hit a different underlying issue which needs further investigation
} | ||
|
||
@Test( | ||
.issue("https://github.com/swiftlang/swift-package-manager/issues/8955", relationship: .defect), |
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.
suggestion: This issue is merged. Can we remove the withKnownIssue
block to confirm whether the test now always passes?
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.
This also hits a different underlying issue now that the first one is fixed which needs further investigation
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.