Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emphasize how to run a single tool test #2070

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/tests/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down
7 changes: 7 additions & 0 deletions src/tests/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down