-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo test --all don't honor --no-default-features for member project #7160
Comments
Unfortunately I think this is another case of #5364. The |
Yes. But when I mix --all with --no-default-features, I will want it be enabled in all projects. |
It appears that #5364 only fixes this for virtual workspaces, but not for workspaces with a root package. I have created a small repo with both scenarios for reference at https://github.com/Skgland/inconsistent-package-features where I would expect both |
… due to rust-lang/cargo#7160 and how if it were default we wouldn't be able to turn it off from a top-level `cargo test --all --no-default-features --features pg14`.
I am having this problem although I am using a virtual workspace. |
Add the default-test cargo feature to control what features we want to enable in the tests. The vtpm/mstpm/wrappers.rs, for example, can't run in the test environment because its malloc() etc functions conflict with the libc standard libraries. This was working before, but now it is not working as expected. "cargo test --workspace" is not honoring --no-default-features for workspace members. rust-lang/cargo#7160 Signed-off-by: Claudio Carvalho <[email protected]>
Project layout looks like
a/Cargo.toml looks like
b/Cargo.toml looks like
And
cargo test --all
will not honor the--no-default-features
flag.b will be compiled with default features hence enable a's feature-a.
The text was updated successfully, but these errors were encountered: