rust-lang / rust-lang/rust

rustdoc: Should we propagate the args passed via `--test-args` to the "nested" libtest harness of `test_harness` doctests?

Open
#157,511 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-doctests C-discussion T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

META: TODO: Proper issue description. For now, follow this link instead for some more context: #t-rustdoc > doctest `test_harness` sadness: passing `--test-threads=1`.

The nasty(?) workaround is creating a runtool (--test-runtool path/to/runtool) that then passes the libtest args.

Would reusing --test-args like this close some doors? Are there situations where you'd like to pass different libtest args to the "host" test harness and to the "guest" test harness?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Zulip discussion about rustdoc test_harness doctests and --test-args. Then trace how arguments reach the host and nested libtest harnesses, and determine whether one --test-args value is sufficient or separate arguments are required. Done means documenting and implementing the agreed propagation behavior, with coverage for the relevant argument-passing cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.