Skip to content

Commit

Permalink
Document how to run unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jun 11, 2021
1 parent 8608047 commit ea48508
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/tests/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea48508

Please sign in to comment.