Skip to content
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

Doc tests use RUST_LOG variable #64309

Closed
Vlad-Shcherbina opened this issue Sep 9, 2019 · 1 comment · Fixed by #64329
Closed

Doc tests use RUST_LOG variable #64309

Vlad-Shcherbina opened this issue Sep 9, 2019 · 1 comment · Fixed by #64329
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Vlad-Shcherbina
Copy link

To reproduce

  1. cargo new --lib doctest_spam
  2. cd doctest_spam
  3. RUST_LOG=info cargo test --doc

Expected results

    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
   Doc-tests doctest_spam

running 0 tests

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

Because RUST_LOG is the env_logger's default for application-level logging and should not affect the output of the tools.

Actual results

    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
   Doc-tests doctest_spam
[INFO  jobserver::imp] created a jobserver: Client { read: File { fd: 3, path: "pipe:[83958]", read: true, write: false }, write: File { fd: 4, path: "pipe:[83958]", read: false, write: true } }
[INFO  rustc_interface::util] codegen backend candidate: /home/username/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends
[INFO  rustc_interface::util] probing /home/username/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends for a codegen backend
[INFO  rustc_metadata::creader] resolving crate `extern crate std as std`
[INFO  rustc_metadata::creader] falling back to a load
...
<250 more lines of this>

Version info

$ cargo --version --verbose
cargo 1.39.0-nightly (fe0e5a48b 2019-09-04)
release: 1.39.0
commit-hash: fe0e5a48b75da2b405c8ce1ba2674e174ae11d5d
commit-date: 2019-09-04

$ rustc --version --verbose
rustc 1.39.0-nightly (2b8116dce 2019-09-08)
binary: rustc
commit-hash: 2b8116dced2c6c5d02e1c4359e89dc0919d6001b
commit-date: 2019-09-08
host: x86_64-unknown-linux-gnu
release: 1.39.0-nightly
LLVM version: 9.0
@Mark-Simulacrum
Copy link
Member

eh, it's only recently we've shifted away from using it for tools -- but seems like the trend is definitely to do so. I've filed #64329.

@Mark-Simulacrum Mark-Simulacrum added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 10, 2019
@bors bors closed this as completed in 403c0de Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants