Document how to run unit tests (#1141)

This commit is contained in:
Yuki Okushi 2021-06-18 05:25:28 +09:00 committed by GitHub
parent ae62be50bd
commit 1373d5beed
1 changed files with 14 additions and 0 deletions

View File

@ -92,6 +92,20 @@ tests for components you did not change at all.
build; therefore, while the tests **usually** work fine with stage 1, build; therefore, while the tests **usually** work fine with stage 1,
there are some limitations. 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 ## Running an individual test
Another common thing that people want to do is to run an **individual Another common thing that people want to do is to run an **individual