Skip to content

Commit a58da1b

Browse files
authored
Document how to run unit tests (#1141)
1 parent be1d3c4 commit a58da1b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/tests/running.md

+14
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,20 @@ tests for components you did not change at all.
9292
build; therefore, while the tests **usually** work fine with stage 1,
9393
there are some limitations.
9494

95+
## Run unit tests on the compiler/library
96+
97+
You may want to run unit tests on a specific file with following:
98+
99+
```bash
100+
./x.py test compiler/rustc_data_structures/src/thin_vec/tests.rs
101+
```
102+
103+
But unfortunately, it's impossible. You should invoke following instead:
104+
105+
```bash
106+
./x.py test compiler/rustc_data_structures/ --test-args thin_vec
107+
```
108+
95109
## Running an individual test
96110

97111
Another common thing that people want to do is to run an **individual

0 commit comments

Comments
 (0)