-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed as not planned
Labels
A-cross-compilingArea: using --target flag for other platformsArea: using --target flag for other platformsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Description
Describe the problem you are trying to solve
Some targets, especially [[test]]
targets, don't make sense to run on every platform. Cargo should allow you to conditionally enable them in the manifest. On Nix this merely causes an annoyance; some tests must have their entire bodies #[cfg()]
ed out. But on libc the problem is more severe; the s390x and sparc64 targets crash in the test harness before executing any tests. There's no way to fix that problem from within test code itself; a Cargo solution is required.
Describe the solution you'd like
It would be great if the [[test]]
section could be conditionally enabled, like this:
[[test]]
name = "test-something"
only-on = 'cfg(target_os = "multics")'
or this:
[[test.'cfg(target_os = "multics")']]
name = "test-something"
Notes
Here's a PR that shows s390x and sparc64 failing early in the test harness.
rust-lang/libc#1235
Metadata
Metadata
Assignees
Labels
A-cross-compilingArea: using --target flag for other platformsArea: using --target flag for other platformsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`