Skip to content

Commit bcd33c3

Browse files
committed
Stabilize --test-runtool and --test-runtool-arg
1 parent 34e9f3b commit bcd33c3

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

src/doc/rustdoc/src/command-line-arguments.md

+17
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,23 @@ For more, see [the chapter on documentation tests](write-documentation/documenta
222222

223223
See also `--test`.
224224

225+
## `--test-runtool`, `--test-runtool-arg`: program to run tests with; args to pass to it
226+
227+
Using these options looks like this:
228+
229+
```bash
230+
$ rustdoc src/lib.rs --test-runtool runner --test-runtool-arg --do-thing --test-runtool-arg --do-other-thing
231+
```
232+
233+
These options can be used to run the doctest under a program, and also pass arguments to
234+
that program. For example, if you want to run your doctests under valgrind you might run
235+
236+
```bash
237+
$ rustdoc src/lib.rs --test-runtool valgrind
238+
```
239+
240+
Another use case would be to run a test inside an emulator, or through a Virtual Machine.
241+
225242
## `--target`: generate documentation for the specified target triple
226243

227244
Using this flag looks like this:

src/doc/rustdoc/src/unstable-features.md

-19
Original file line numberDiff line numberDiff line change
@@ -666,25 +666,6 @@ struct Foo;
666666
In older versions, this will be ignored on all targets, but on newer versions `ignore-gnu` will
667667
override `ignore`.
668668

669-
## `--test-runtool`, `--test-runtool-arg`: program to run tests with; args to pass to it
670-
671-
* Tracking issue: [#64245](https://github.com/rust-lang/rust/issues/64245)
672-
673-
Using these options looks like this:
674-
675-
```bash
676-
$ rustdoc src/lib.rs -Z unstable-options --test-runtool runner --test-runtool-arg --do-thing --test-runtool-arg --do-other-thing
677-
```
678-
679-
These options can be used to run the doctest under a program, and also pass arguments to
680-
that program. For example, if you want to run your doctests under valgrind you might run
681-
682-
```bash
683-
$ rustdoc src/lib.rs -Z unstable-options --test-runtool valgrind
684-
```
685-
686-
Another use case would be to run a test inside an emulator, or through a Virtual Machine.
687-
688669
## `--with-examples`: include examples of uses of items as documentation
689670

690671
* Tracking issue: [#88791](https://github.com/rust-lang/rust/issues/88791)

src/librustdoc/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,15 @@ fn opts() -> Vec<RustcOptGroup> {
515515
"",
516516
),
517517
opt(
518-
Unstable,
518+
Stable,
519519
Opt,
520520
"",
521521
"test-runtool",
522522
"",
523523
"The tool to run tests with when building for a different target than host",
524524
),
525525
opt(
526-
Unstable,
526+
Stable,
527527
Multi,
528528
"",
529529
"test-runtool-arg",

tests/rustdoc/doctest/doctest-runtool.rs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//@ compile-flags: --test-runtool=auxiliary/bin/doctest-runtool
77
//@ compile-flags: --test-runtool-arg=arg1 --test-runtool-arg
88
//@ compile-flags: 'arg2 with space'
9-
//@ compile-flags: -Zunstable-options
109

1110
/// ```
1211
/// assert_eq!(std::env::var("DOCTEST_RUNTOOL_CHECK"), Ok("xyz".to_string()));

0 commit comments

Comments
 (0)