From db292bd89e8c479dbef1eadfe5d84a9b425795c6 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Thu, 18 Apr 2024 17:06:30 -0700 Subject: Make test harness arguments configurable and not `--nocapture`. * Added config `runnables.extraTestBinaryArgs` to control the args. * The default is `--show-output` rather than `--nocapture` to prevent unreadable output when 2 or more tests fail or print output at once. * Renamed variables in `CargoTargetSpec::runnable_args()` for clarity. Fixes . --- docs/user/generated_config.adoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs') diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc index af4483a2cc3..d509e58612f 100644 --- a/docs/user/generated_config.adoc +++ b/docs/user/generated_config.adoc @@ -851,6 +851,24 @@ Command to be executed instead of 'cargo' for runnables. -- Additional arguments to be passed to cargo for runnables such as tests or binaries. For example, it may be `--release`. +-- +[[rust-analyzer.runnables.extraTestBinaryArgs]]rust-analyzer.runnables.extraTestBinaryArgs:: ++ +-- +Default: +---- +[ + "--show-output" +] +---- +Additional arguments to be passed through Cargo to launched tests, benchmarks, or +doc-tests. + +Unless the launched target uses a +[custom test harness](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field), +they will end up being interpreted as options to +[`rustc`’s built-in test harness (“libtest”)](https://doc.rust-lang.org/rustc/tests/index.html#cli-arguments). + -- [[rust-analyzer.rustc.source]]rust-analyzer.rustc.source (default: `null`):: + -- cgit 1.4.1-3-g733a5