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

doc(unstable): cargo test does not provide --keep-going #12492

Merged
merged 1 commit into from
Aug 14, 2023
Merged
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
16 changes: 13 additions & 3 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,9 @@ like to stabilize it somehow!
### keep-going
* Tracking Issue: [#10496](https://github.com/rust-lang/cargo/issues/10496)

`cargo build --keep-going` (and similarly for `check`, `test` etc) will build as
many crates in the dependency graph as possible, rather than aborting the build
at the first one that fails to build.
`cargo build --keep-going` (and similarly for every command involving compilation, like `check` and `doc`)
will build as many crates in the dependency graph as possible,
rather than aborting the build at the first one that fails to build.

For example if the current package depends on dependencies `fails` and `works`,
one of which fails to build, `cargo check -j1` may or may not build the one that
Expand All @@ -449,6 +449,16 @@ The `-Z unstable-options` command-line option must be used in order to use
cargo check --keep-going -Z unstable-options
```

While `cargo test` and `cargo bench` commands involve compilation, they do not provide a `--keep-going` flag.
Both commands already include a similar `--no-fail-fast` flag, allowing running as many tests as possible without stopping at the first failure.
To "compile" as many tests as possible, use target selection flags like `--tests` to build test binaries separately.
For example,

```console
cargo build --tests --keep-going -Zunstable-options
epage marked this conversation as resolved.
Show resolved Hide resolved
cargo test --tests --no-fail-fast
```

### config-include
* Tracking Issue: [#7723](https://github.com/rust-lang/cargo/issues/7723)

Expand Down
Loading