Skip to content

cargo test with arguments can execute only one test #30422

Closed
@vi

Description

@vi
cargo$ cargo test test_shell test_bad_config
     Running target/debug/cargo-c97bf52348f1d789

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

     Running target/debug/resolve-1d3395deaec414e3

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

     Running target/debug/tests-96c75a2dbabea728

running 5 tests
test test_shell::color_explicitly_disabled ... ok
test test_shell::color_explicitly_enabled ... ok
test test_shell::non_tty ... ok
test test_shell::colored_shell ... ok
test test_shell::no_term ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured

   Doc-tests cargo

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

Expecting for it also to execute "test_bad_config" tests.

Maybe previously it was working.

Cargo isn't actually the one interpreting these arguments, they're passed down to the test binary which is interpreted by libtest in the main distribution. Could you open a bug in rust-lang/rust about this instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-feature-acceptedCategory: A feature request that has been accepted pending implementation.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions