Skip to content

"cargo miri test" ignores "required-features" #1512

Closed
@alecmocatta

Description

@alecmocatta

cargo test compiles and runs only tests that aren't disabled via required-features = ["foo"] (or test = false) in Cargo.toml.

cargo miri test tries to compile and run all tests, resulting in either target `test_foo` in package `xyz` requires the features: `foo` or arbitrary errors from explicitly disabled tests.

A fix for this would probably check for the args --no-default-features --features="..." and --all-features, pass them to cargo_metadata::MetadataCommand, read Node::features, and then filter the targets returned by list_targets().

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargoArea: affects the cargo wrapper (cargo miri)C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions