about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-06-18 05:25:28 +0900
committerGitHub <noreply@github.com>2021-06-17 17:25:28 -0300
commit1cb31172c1102736012183601e94a01e6e197f4c (patch)
tree6b1b123e6f6430363af0e8c5dc941272a7d977f4 /src/doc/rustc-dev-guide
parentba3c0b898e6f067149dafcc2d5bb54b202d2000c (diff)
downloadrust-1cb31172c1102736012183601e94a01e6e197f4c.tar.gz
rust-1cb31172c1102736012183601e94a01e6e197f4c.zip
Document how to run unit tests (#1141)
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/tests/running.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/running.md b/src/doc/rustc-dev-guide/src/tests/running.md
index 874ef827461..34a44f9c24c 100644
--- a/src/doc/rustc-dev-guide/src/tests/running.md
+++ b/src/doc/rustc-dev-guide/src/tests/running.md
@@ -92,6 +92,20 @@ tests for components you did not change at all.
 build; therefore, while the tests **usually** work fine with stage 1,
 there are some limitations.
 
+## Run unit tests on the compiler/library
+
+You may want to run unit tests on a specific file with following:
+
+```bash
+./x.py test compiler/rustc_data_structures/src/thin_vec/tests.rs
+```
+
+But unfortunately, it's impossible. You should invoke following instead:
+
+```bash
+./x.py test compiler/rustc_data_structures/ --test-args thin_vec
+```
+
 ## Running an individual test
 
 Another common thing that people want to do is to run an **individual