Skip to content
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

The new Musl SDK does not include XCTest #396

Open
finagolfin opened this issue Jun 18, 2024 · 2 comments
Open

The new Musl SDK does not include XCTest #396

finagolfin opened this issue Jun 18, 2024 · 2 comments

Comments

@finagolfin
Copy link

finagolfin commented Jun 18, 2024

I've been trying out the new 6.0 and 6.1 Musl SDKs to build some packages and they work great.

However, the lack of XCTest means I cannot run the tests for these packages against Musl, as the build of the Musl SDK stops with swift-corelibs-foundation.

@al45tair, any reason XCTest can't be included also? It would be great if I can run the tests.

@al45tair
Copy link
Contributor

Including XCTest wouldn't be as useful as you'd think — you couldn't use swift test to trigger them, because when you're using an SDK, you're cross-compiling, and SwiftPM doesn't know how to run cross-tests yet (notably doing so would mean you'd have to specify somehow how to start the tests, because they might not run on the host machine; in the specific case of the Static SDK for Linux, it's a bit odd because if you're on a Linux or FreeBSD machine then you might actually be able to run the tests on the host, but that's a special case and SwiftPM has no way to know that that would work either).

@finagolfin
Copy link
Author

As you said, if you happen to be building on the same OS/arch, you should be able to run the tests, and I'm one of the few who knows how to run cross-compiled tests manually too. 😉

Btw, you've inspired me to finally put together SDK bundles for Android. I had been putting off looking at how Max's swift-sdk-generator worked and adapting that for Android, but I think I'll just script it myself for now, as you did.

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

No branches or pull requests

2 participants