Skip to content

bug: cannot find tests with debug level line-tables-only #910

@BugenZhao

Description

@BugenZhao

Hello, and thanks for your great work!

Recently I find that when the debug level is set to line-tables-only for a cargo profile, nextest will not be able to find any tests in the workspace.

https://github.com/BugenZhao/nextest-debug-level-reproduce/blob/fbe89c3c60a9ab0abcd04fd96c53cc544432ccdc/Cargo.toml#L10-L16

❯ cargo nextest run --cargo-profile dev-line-tables-only
    Finished dev-line-tables-only [unoptimized + debuginfo] target(s) in 0.00s
    Starting 0 tests across 0 binaries
------------
     Summary [   0.000s] 0 tests run: 0 passed, 0 skipped

❯ cargo nextest run                                     
    Finished test [unoptimized + debuginfo] target(s) in 0.00s
    Starting 1 test across 1 binary
        PASS [   0.005s] nextest-debug-level tests::it_works
------------
     Summary [   0.005s] 1 test run: 1 passed, 0 skipped

While plain cargo test does not have this issue:

❯ cargo test --profile dev-line-tables-only --quiet

running 1 test
.
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions