Skip to content

Cargo test skipping doc tests #44568

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

Closed
vorner opened this issue Sep 14, 2017 · 2 comments
Closed

Cargo test skipping doc tests #44568

vorner opened this issue Sep 14, 2017 · 2 comments

Comments

@vorner
Copy link
Contributor

vorner commented Sep 14, 2017

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.

@ollie27
Copy link
Member

ollie27 commented Sep 14, 2017

Try updating your nightly version. I'm guessing this is a dupe of #44487.

@vorner
Copy link
Contributor Author

vorner commented Sep 14, 2017

Silly me, yes, you're right. I tricked myself by having a script that does not upgrade the nightly compiler if it can't compile current clippy ‒ so I believed I had the newest and I did not. After upgrading it indeed works.

So, my apologies for a useless report.

@vorner vorner closed this as completed Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants