Skip to content

Cargo test skipping doc tests #44568

Closed
Closed
@vorner

Description

@vorner

For some time (a week, maybe?) I see a strange failure (or lack of) of doctests. How to reproduce:

  • cargo new broken
  • Put this content into the src/lib.rs
//! ```rust
//! broken test
//! ```

When I run cargo +nightl test, I get this output (eg. no statistics of how many doc tests were run and no failure):

$ cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/broken-df6cff22daace888

running 0 tests

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

   Doc-tests broken

When I run with +stable, I get proper test failure and statistics.

The nightly is:

rustc 1.22.0-nightly (ca94c75c5 2017-09-10)
binary: rustc
commit-hash: ca94c75c527006be0824c764773380bbeea6030b
commit-date: 2017-09-10
host: x86_64-unknown-linux-gnu
release: 1.22.0-nightly
LLVM version: 4.0

When searching through the issues, I met only this #44237 issue, but I don't think it is the same problem.

I'm a bit surprised nobody reported this before me, is it possible it is some kind of local problem? But I can't come up with an idea what that could be or what to check for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions