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
Time to remove using default test entry point files like LinuxMain.swift? #7394
Comments
There's no default test entry file in SwiftPM and it's not forced on users in any way, especially since none of our |
@stmontgomery is probably more knowledgeable than I am as he added the option in question. Custom test entry point files are an experimental feature and I don't think we intended to keep them around forever. |
Take a look at the source.
Swift-numerics cited above is a counter-example, ironically because it was trying to get people to use |
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?Description
Many repos that had this file could be overridden by passing in
--enable-test-discovery
, particularly when they were trying to push users to add that flag, apple/swift-numerics#280, but now that that flag has been removed, #7391, this default test entry file will again be forced on users, with no automated test discovery override but manually removing it.Expected behavior
warning: '--enable-test-discovery' was specified so the 'LinuxMain.swift' entry point file for 'swift-numericsPackageTests' will be ignored and an entry point will be generated automatically. To use test discovery with a custom entry point file, pass '--experimental-test-entry-point-path '.
Building for debugging...
Actual behavior
Using these commands instead, as a trunk snapshot build after #7391 has not been released yet but the flag was already partially disabled, eg for this command:
Steps to reproduce
cd swift-numerics/
swift test --enable-test-discovery
Swift Package Manager version/commit hash
The March 1 trunk snapshot started showing the above error
Swift & OS version (output of
swift --version ; uname -a
)Swift 6.0 on linux x86_64
The text was updated successfully, but these errors were encountered: