Skip to content

[DESIGN BUG] doctest should print Running runner, which maybe expensive. #139920

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
loynoir opened this issue Apr 16, 2025 · 1 comment
Closed
Labels
C-bug Category: This is a bug.

Comments

@loynoir
Copy link

loynoir commented Apr 16, 2025

BUG

[DESIGN BUG] doctest should print Running runner, which maybe expensive.

actual

test does print Running runner.

  • Running `/path/to/runner-ssh-aarch64-linux-android.sh ...`
       Fresh doctest_example v0.1.0 (/path/to/doctest_example)
      Timing report saved to /path/to/target/cargo-timings/cargo-timing-XXX.html
    Finished `XXX` profile [optimized] target(s) in 0.01s
     Running `/path/to/runner-ssh-aarch64-linux-android.sh /path/to/target/aarch64-linux-android/XXX/deps/doctest_example-XXX`

running 0 tests

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

doctest does not print Running runner, which maybe expensive.

   Doc-tests doctest_example
     Running `/home/vscode/.rustup/toolchains/nightly-2025-04-14-x86_64-unknown-linux-gnu/bin/rustdoc ...`
WARNING: No rustdoc doctest environment variable provided so doctests will be run in the same process

running 1 test
test doctest_example/src/lib.rs - add (line 3) ... ok

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

expected

doctest should print Running runner, which maybe expensive.

  • [PATCH] Running `/path/to/runner-ssh-aarch64-linux-android.sh /path/to/target/XXX/path/to/doctest/merged_doctest_2024/rust_out`
       Fresh doctest_example v0.1.0 (/path/to/doctest_example)
      Timing report saved to /path/to/target/cargo-timings/cargo-timing-XXX.html
    Finished `XXX` profile [optimized] target(s) in 0.01s
     Running `/path/to/runner-ssh-aarch64-linux-android.sh /path/to/target/aarch64-linux-android/XXX/deps/doctest_example-XXX`

running 0 tests

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

   Doc-tests doctest_example
     Running `/home/vscode/.rustup/toolchains/nightly-2025-04-14-x86_64-unknown-linux-gnu/bin/rustdoc ...`
     [PATCH] Running `/path/to/runner-ssh-aarch64-linux-android.sh /path/to/target/XXX/path/to/doctest/merged_doctest_2024/rust_out`
WARNING: No rustdoc doctest environment variable provided so doctests will be run in the same process

running 1 test
test doctest_example/src/lib.rs - add (line 3) ... ok

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

version

channel = "nightly-2025-04-14"

workaround

Every runner embed

BOLD_GREEN='\e[1;32m'
RESET='\e[0m'
if [ -v CARGO_CRATE_NAME ]; then
    # case: rustdoc
    echo -e "     ${BOLD_GREEN:?}[PATCH] Running${RESET:?} \`$0 $*\`" >&2
fi
@loynoir loynoir added the C-bug Category: This is a bug. label Apr 16, 2025
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 16, 2025
@loynoir
Copy link
Author

loynoir commented Apr 16, 2025

Sorry. Should be cargo issue.

@loynoir loynoir closed this as completed Apr 16, 2025
@jieyouxu jieyouxu removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants