about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authoradwin <52573298+adwinwhite@users.noreply.github.com>2024-09-20 15:10:29 +0800
committerGitHub <noreply@github.com>2024-09-20 15:10:29 +0800
commit0e87ca18881fd12abf5ce140cc75a423f80a4efd (patch)
tree7306dc024d54a701fd7e9d499684f2358b430a8d /src/doc/rustc-dev-guide
parent41b0e66ec1e3a5ee26ce561d94e1c06fd6e3a955 (diff)
downloadrust-0e87ca18881fd12abf5ce140cc75a423f80a4efd.tar.gz
rust-0e87ca18881fd12abf5ce140cc75a423f80a4efd.zip
Emphasize how to run a single tool test (#2070)
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/tests/intro.md4
-rw-r--r--src/doc/rustc-dev-guide/src/tests/running.md7
2 files changed, 11 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/intro.md b/src/doc/rustc-dev-guide/src/tests/intro.md
index 4ed5fb69a8f..d0c718d5c40 100644
--- a/src/doc/rustc-dev-guide/src/tests/intro.md
+++ b/src/doc/rustc-dev-guide/src/tests/intro.md
@@ -124,6 +124,10 @@ To run the tool's tests, just pass its path to `./x test`.
 
 Usually these tools involve running `cargo test` within the tool's directory.
 
+If you want to run only a specified set of tests, append `--test-args FILTER_NAME` to the command.
+
+> Example: `./x test src/tools/miri --test-args padding`
+
 In CI, some tools are allowed to fail.
 Failures send notifications to the corresponding teams, and is tracked on the [toolstate website].
 More information can be found in the [toolstate documentation].
diff --git a/src/doc/rustc-dev-guide/src/tests/running.md b/src/doc/rustc-dev-guide/src/tests/running.md
index 395d5dc7e4b..a081d3db42c 100644
--- a/src/doc/rustc-dev-guide/src/tests/running.md
+++ b/src/doc/rustc-dev-guide/src/tests/running.md
@@ -62,6 +62,13 @@ Likewise, you can test a single file by passing its path:
 ./x test tests/ui/const-generics/const-test.rs
 ```
 
+`x` doesn't support running a single tool test by passing its path yet.
+You'll have to use the `--test-args` argument as describled [below](#running-an-individual-test).
+
+```bash
+./x test src/tools/miri --test-args tests/fail/uninit/padding-enum.rs
+```
+
 ### Run only the tidy script
 
 ```bash