Skip to content

Commit 06b80b1

Browse files
authored
Emphasize how to run a single tool test (#2070)
1 parent ed0e273 commit 06b80b1

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/tests/intro.md

+4
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ To run the tool's tests, just pass its path to `./x test`.
124124
125125
Usually these tools involve running `cargo test` within the tool's directory.
126126

127+
If you want to run only a specified set of tests, append `--test-args FILTER_NAME` to the command.
128+
129+
> Example: `./x test src/tools/miri --test-args padding`
130+
127131
In CI, some tools are allowed to fail.
128132
Failures send notifications to the corresponding teams, and is tracked on the [toolstate website].
129133
More information can be found in the [toolstate documentation].

src/tests/running.md

+7
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ Likewise, you can test a single file by passing its path:
6262
./x test tests/ui/const-generics/const-test.rs
6363
```
6464

65+
`x` doesn't support running a single tool test by passing its path yet.
66+
You'll have to use the `--test-args` argument as describled [below](#running-an-individual-test).
67+
68+
```bash
69+
./x test src/tools/miri --test-args tests/fail/uninit/padding-enum.rs
70+
```
71+
6572
### Run only the tidy script
6673

6774
```bash

0 commit comments

Comments
 (0)