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
swift build --build-tests
doesn't work with --enable-test-discovery
flag
#7389
Comments
@MaxDesiatov I don't seem to be able to move the issue over myself (presumably a permissions issue.) |
I can't move that either. Created apple/swift-numerics#280 in the meantime. |
Reopening while I make sure that |
With #7391 under review, I don't think this issue should stay open. |
Sure thing. I didn't realize you'd opened that PR! We can forward-dup this issue to that PR then. |
Duplicate of #7391 |
The very fact disabling the flag in your pull broke running a package's tests shows it had an effect prior to your pull. I don't think removing the There should be a push in the Swift community to remove those files first, particularly in Apple's own repos like these, before you can remove the flag. @tomerd? |
You won't be able to tests those packages with |
How so? While that flag is currently unnecessary generally, it is still useful to override older tags of packages that still have a |
This flag was deprecated for 4 years since Swift 5.4, Swift 6.0 is a good opportunity to remove it. Closes #7389.
Reverting this in #7395 as it's blocking our PR testing. We also seem to be using As far as I understand, it seems the intention of the I'd say we have a couple of choices here:
As an aside, is |
…7396) Ensures that a fully-initialized `TestingParameters` structure is used with `swift build --build-tests` instead of using any default parameters (which will tend us toward the wrong output with packages that use `--enable-test-discovery` and still have LinuxMain.swift files.) Tested with swift-numerics on Ubuntu 22.04 aarch64; before the change, we'd hit the `fatalError()` call in that package's LinuxMain.swift file. After the change, we correctly run XCTest-based tests. Resolves #7389.
It appears the lack of tests hurt us here: this pull broke
swift build --build-tests
registering the--enable-test-discovery
flag also. My Android CI buildsswift-numerics
trunk daily with the latest Swift trunk snapshot builds and those flags: it now errors with the March 1 snapshot.I can reproduce the crash on linux x86_64 with the following commands, which work with the last Feb. 29 trunk snapshot before this pull:
Originally posted by @finagolfin in #7377 (comment)
The text was updated successfully, but these errors were encountered: