Skip to content

Commit a533445

Browse files
Rollup merge of rust-lang#153143 - ferrocene:jh/bootstrap-test-targets, r=Mark-Simulacrum,kobzol
Allow `./x test` to run tests without doc tests and without benchmarks # Problem For Ferrocene we would like to run only the `coretests` and `alloctests` test suites when measuring code coverage. Running `corebenches` and `allocbenches` would alter the numbers, which is not compliant with the certification. This is currently not possible in bootstrap. By default `./x test` runs unit, integration and doc tests. `./x test --doc` only runs doc tests. So far, so good. The problem is that while `./x test --no-doc` stops bootstrap from executing doc tests, it surprisingly starts executing benchmarks (next to examples and bins as well). It basically behaves like `cargo test --all-targets`. # Solution This PR renames the existing `--no-doc` flag to `--all-targets` and keeps the same behaviour as before. Unfortunately it is not possible to internally switch from `cargo --bins --examples --tests --benches` to `cargo --all-targets` because it will fail e.g. `./x test library/alloc --all-targets` with an error like "use of unstable library feature `test`". Additionally, this PR add a `./x test --tests` flag (equivalent to `cargo test --tests`) that only executes unit and integration tests. Both changes we are doing in https://github.com/ferrocene/ferrocene anyways, but believe that they may be useful for other people as well and therefore would like to contribute them. Note that this PR does _not_ change the behaviour of either `./x test` or `./x test --doc`. ## Note on `test = true` While this change enables bootstrap to run tests without doc tests and without benchmarks, executing `./x test library/core library/alloc --tests` will still build and execute `corebenches` and `allocbenches`. What?! 😱 Why all of this effort to enable it then? Good question! The reason they are still executed is, that they are marked with `test = true` in their respective `Cargo.toml` ([corebenches](https://github.com/rust-lang/rust/blob/3f9853562c73af38a5e6af8b0da1b2734a327e19/library/coretests/Cargo.toml#L24), [allocbenches](https://github.com/rust-lang/rust/blob/3f9853562c73af38a5e6af8b0da1b2734a327e19/library/alloctests/Cargo.toml#L32)). @bjorn3 mentioned that it is important for upstream that those benchmarks are executed by default, even if no `./x --all-targets` is passed. This is perfectly possible with this PR. Benchmarks marked with `test = true` will be executed when calling either of `./x test`, `./x test --tests` or `./x --all-targets`. Therefore this PR does not include a commit to change that. We will just do this change in https://github.com/ferrocene/ferrocene. ## Open questions ### Error message I added one commit that adds an error message if a user passes `--no-doc` and points them to `--all-targets` and `--tests`. I think it might be nice to have, but if you think it is not necessary, I can remove it. # How to test this change You can see the change in action by running `./x test library/alloc --tests` and `./x test library/alloc --all-targets`. The first will execute `alloctests` and `allocbenches` (which is marked with `test = true`), while the second will additionally run `benches/vec_deque_append.rs` (which is _not_ marked with `test = true`).
2 parents c765c59 + c555edb commit a533445

16 files changed

Lines changed: 146 additions & 82 deletions

File tree

library/alloctests/benches/vec_deque_append.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const BENCH_N: usize = 1000;
88
fn main() {
99
if cfg!(miri) {
1010
// Don't benchmark Miri...
11-
// (Due to bootstrap quirks, this gets picked up by `x.py miri library/alloc --no-doc`.)
11+
// (Due to bootstrap quirks, this gets picked up by `x.py miri library/alloc --all-targets`.)
1212
return;
1313
}
1414
let a: VecDeque<i32> = (0..VECDEQUE_LEN).collect();

src/bootstrap/mk/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ check-aux:
6464
library/core \
6565
library/alloc \
6666
$(BOOTSTRAP_ARGS) \
67-
--no-doc
67+
--all-targets
6868
# Some doctests use file system operations to demonstrate dealing with `Result`,
6969
# so we have to run them with isolation disabled.
7070
$(Q)MIRIFLAGS="-Zmiri-disable-isolation" \

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use crate::utils::helpers::{
4141
linker_args, linker_flags, t, target_supports_cranelift_backend, up_to_date,
4242
};
4343
use crate::utils::render_tests::{add_flags_and_try_run_tests, try_run_tests};
44-
use crate::{CLang, CodegenBackendKind, DocTests, GitRepo, Mode, PathSet, envify};
44+
use crate::{CLang, CodegenBackendKind, GitRepo, Mode, PathSet, TestTarget, envify};
4545

4646
mod compiletest;
4747

@@ -174,7 +174,7 @@ You can skip linkcheck with --skip src/tools/linkchecker"
174174
);
175175
run_cargo_test(cargo, &[], &[], "linkchecker self tests", bootstrap_host, builder);
176176

177-
if builder.doc_tests == DocTests::No {
177+
if !builder.test_target.runs_doctests() {
178178
return;
179179
}
180180

@@ -827,15 +827,14 @@ impl Step for CargoMiri {
827827

828828
// We're not using `prepare_cargo_test` so we have to do this ourselves.
829829
// (We're not using that as the test-cargo-miri crate is not known to bootstrap.)
830-
match builder.doc_tests {
831-
DocTests::Yes => {}
832-
DocTests::No => {
833-
cargo.args(["--lib", "--bins", "--examples", "--tests", "--benches"]);
830+
match builder.test_target {
831+
TestTarget::AllTargets => {
832+
cargo.args(["--lib", "--bins", "--examples", "--tests", "--benches"])
834833
}
835-
DocTests::Only => {
836-
cargo.arg("--doc");
837-
}
838-
}
834+
TestTarget::Default => &mut cargo,
835+
TestTarget::DocOnly => cargo.arg("--doc"),
836+
TestTarget::Tests => cargo.arg("--tests"),
837+
};
839838
cargo.arg("--").args(builder.config.test_args());
840839

841840
// Finally, run everything.
@@ -1213,7 +1212,7 @@ impl Step for RustdocGUI {
12131212

12141213
fn is_default_step(builder: &Builder<'_>) -> bool {
12151214
builder.config.nodejs.is_some()
1216-
&& builder.doc_tests != DocTests::Only
1215+
&& builder.test_target != TestTarget::DocOnly
12171216
&& get_browser_ui_test_version(builder).is_some()
12181217
}
12191218

@@ -1303,7 +1302,7 @@ impl Step for Tidy {
13031302
}
13041303

13051304
fn is_default_step(builder: &Builder<'_>) -> bool {
1306-
builder.doc_tests != DocTests::Only
1305+
builder.test_target != TestTarget::DocOnly
13071306
}
13081307

13091308
fn make_run(run: RunConfig<'_>) {
@@ -1862,7 +1861,7 @@ impl Step for Compiletest {
18621861
}
18631862

18641863
fn run(self, builder: &Builder<'_>) {
1865-
if builder.doc_tests == DocTests::Only {
1864+
if builder.test_target == TestTarget::DocOnly {
18661865
return;
18671866
}
18681867

@@ -2980,15 +2979,12 @@ fn prepare_cargo_test(
29802979
cargo.arg("--message-format=json");
29812980
}
29822981

2983-
match builder.doc_tests {
2984-
DocTests::Only => {
2985-
cargo.arg("--doc");
2986-
}
2987-
DocTests::No => {
2988-
cargo.args(["--bins", "--examples", "--tests", "--benches"]);
2989-
}
2990-
DocTests::Yes => {}
2991-
}
2982+
match builder.test_target {
2983+
TestTarget::AllTargets => cargo.args(["--bins", "--examples", "--tests", "--benches"]),
2984+
TestTarget::Default => &mut cargo,
2985+
TestTarget::DocOnly => cargo.arg("--doc"),
2986+
TestTarget::Tests => cargo.arg("--tests"),
2987+
};
29922988

29932989
for krate in crates {
29942990
cargo.arg("-p").arg(krate);
@@ -3868,7 +3864,7 @@ impl Step for CodegenCranelift {
38683864
let host = run.build_triple();
38693865
let compilers = RustcPrivateCompilers::new(run.builder, run.builder.top_stage, host);
38703866

3871-
if builder.doc_tests == DocTests::Only {
3867+
if builder.test_target == TestTarget::DocOnly {
38723868
return;
38733869
}
38743870

@@ -3989,7 +3985,7 @@ impl Step for CodegenGCC {
39893985
let host = run.build_triple();
39903986
let compilers = RustcPrivateCompilers::new(run.builder, run.builder.top_stage, host);
39913987

3992-
if builder.doc_tests == DocTests::Only {
3988+
if builder.test_target == TestTarget::DocOnly {
39933989
return;
39943990
}
39953991

src/bootstrap/src/core/config/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,12 @@ impl Config {
415415
"flags.exclude" = ?flags_exclude
416416
);
417417

418+
if flags_cmd.no_doc() {
419+
eprintln!(
420+
"WARN: `x.py test --no-doc` is renamed to `--all-targets`. `--no-doc` will be removed in the near future. Additionally `--tests` is added which only executes unit and integration tests."
421+
)
422+
}
423+
418424
// Set config values based on flags.
419425
let mut exec_ctx = ExecutionContext::new(flags_verbose, flags_cmd.fail_fast());
420426
exec_ctx.set_dry_run(if flags_dry_run { DryRun::UserSelected } else { DryRun::Disabled });

src/bootstrap/src/core/config/flags.rs

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::core::build_steps::setup::Profile;
1515
use crate::core::builder::{Builder, Kind};
1616
use crate::core::config::Config;
1717
use crate::core::config::target_selection::{TargetSelectionList, target_selection_list};
18-
use crate::{Build, CodegenBackendKind, DocTests};
18+
use crate::{Build, CodegenBackendKind, TestTarget};
1919

2020
#[derive(Copy, Clone, Default, Debug, ValueEnum)]
2121
pub enum Color {
@@ -357,7 +357,7 @@ pub enum Subcommand {
357357
should be compiled and run. For example:
358358
./x.py test tests/ui
359359
./x.py test library/std --test-args hash_map
360-
./x.py test library/std --stage 0 --no-doc
360+
./x.py test library/std --stage 0 --all-targets
361361
./x.py test tests/ui --bless
362362
./x.py test tests/ui --compare-mode next-solver
363363
Note that `test tests/* --stage N` does NOT depend on `build compiler/rustc --stage N`;
@@ -382,11 +382,14 @@ pub enum Subcommand {
382382
#[arg(long, value_name = "ARGS", allow_hyphen_values(true))]
383383
compiletest_rustc_args: Vec<String>,
384384
#[arg(long)]
385-
/// do not run doc tests
386-
no_doc: bool,
385+
/// Run all test targets (no doc tests)
386+
all_targets: bool,
387387
#[arg(long)]
388-
/// only run doc tests
388+
/// Only run doc tests
389389
doc: bool,
390+
/// Only run unit and integration tests
391+
#[arg(long)]
392+
tests: bool,
390393
#[arg(long)]
391394
/// whether to automatically update stderr/stdout files
392395
bless: bool,
@@ -425,6 +428,11 @@ pub enum Subcommand {
425428
#[arg(long)]
426429
/// Ignore `//@ ignore-backends` directives.
427430
bypass_ignore_backends: bool,
431+
432+
/// Deprecated. Use `--all-targets` or `--tests` instead.
433+
#[arg(long)]
434+
#[doc(hidden)]
435+
no_doc: bool,
428436
},
429437
/// Build and run some test suites *in Miri*
430438
Miri {
@@ -436,11 +444,19 @@ pub enum Subcommand {
436444
/// (e.g. libtest, compiletest or rustdoc)
437445
test_args: Vec<String>,
438446
#[arg(long)]
439-
/// do not run doc tests
440-
no_doc: bool,
447+
/// Run all test targets (no doc tests)
448+
all_targets: bool,
441449
#[arg(long)]
442-
/// only run doc tests
450+
/// Only run doc tests
443451
doc: bool,
452+
/// Only run unit and integration tests
453+
#[arg(long)]
454+
tests: bool,
455+
456+
/// Deprecated. Use `--all-targets` or `--tests` instead.
457+
#[arg(long)]
458+
#[doc(hidden)]
459+
no_doc: bool,
444460
},
445461
/// Build and run some benchmarks
446462
Bench {
@@ -552,18 +568,26 @@ impl Subcommand {
552568
}
553569
}
554570

555-
pub fn doc_tests(&self) -> DocTests {
571+
pub fn test_target(&self) -> TestTarget {
556572
match *self {
557-
Subcommand::Test { doc, no_doc, .. } | Subcommand::Miri { no_doc, doc, .. } => {
558-
if doc {
559-
DocTests::Only
560-
} else if no_doc {
561-
DocTests::No
562-
} else {
563-
DocTests::Yes
573+
Subcommand::Test { all_targets, doc, tests, .. }
574+
| Subcommand::Miri { all_targets, doc, tests, .. } => match (all_targets, doc, tests) {
575+
(true, true, _) | (true, _, true) | (_, true, true) => {
576+
panic!("You can only set one of `--all-targets`, `--doc` and `--tests`.")
564577
}
565-
}
566-
_ => DocTests::Yes,
578+
(true, false, false) => TestTarget::AllTargets,
579+
(false, true, false) => TestTarget::DocOnly,
580+
(false, false, true) => TestTarget::Tests,
581+
(false, false, false) => TestTarget::Default,
582+
},
583+
_ => TestTarget::Default,
584+
}
585+
}
586+
587+
pub fn no_doc(&self) -> bool {
588+
match *self {
589+
Subcommand::Test { no_doc, .. } | Subcommand::Miri { no_doc, .. } => no_doc,
590+
_ => false,
567591
}
568592
}
569593

src/bootstrap/src/lib.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,21 @@ impl std::str::FromStr for CodegenBackendKind {
177177
}
178178

179179
#[derive(PartialEq, Eq, Copy, Clone, Debug)]
180-
pub enum DocTests {
181-
/// Run normal tests and doc tests (default).
182-
Yes,
183-
/// Do not run any doc tests.
184-
No,
180+
pub enum TestTarget {
181+
/// Run unit, integration and doc tests (default).
182+
Default,
183+
/// Run unit, integration, doc tests, examples, bins, benchmarks (no doc tests).
184+
AllTargets,
185185
/// Only run doc tests.
186-
Only,
186+
DocOnly,
187+
/// Only run unit and integration tests.
188+
Tests,
189+
}
190+
191+
impl TestTarget {
192+
fn runs_doctests(&self) -> bool {
193+
matches!(self, TestTarget::DocOnly | TestTarget::Default)
194+
}
187195
}
188196

189197
pub enum GitRepo {
@@ -222,7 +230,7 @@ pub struct Build {
222230
in_tree_gcc_info: GitInfo,
223231
local_rebuild: bool,
224232
fail_fast: bool,
225-
doc_tests: DocTests,
233+
test_target: TestTarget,
226234
verbosity: usize,
227235

228236
/// Build triple for the pre-compiled snapshot compiler.
@@ -540,7 +548,7 @@ impl Build {
540548
initial_sysroot: config.initial_sysroot.clone(),
541549
local_rebuild: config.local_rebuild,
542550
fail_fast: config.cmd.fail_fast(),
543-
doc_tests: config.cmd.doc_tests(),
551+
test_target: config.cmd.test_target(),
544552
verbosity: config.exec_ctx.verbosity as usize,
545553

546554
host_target: config.host_target,

src/bootstrap/src/utils/change_tracker.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub fn human_readable_changes(changes: &[ChangeInfo]) -> String {
7373
/// Keeps track of major changes made to the bootstrap configuration.
7474
///
7575
/// If you make any major changes (such as adding new values or changing default values),
76-
/// please ensure adding `ChangeInfo` to the end(because the list must be sorted by the merge date)
76+
/// please ensure adding `ChangeInfo` to the end (because the list must be sorted by the merge date)
7777
/// of this list.
7878
pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
7979
ChangeInfo {
@@ -611,4 +611,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
611611
severity: ChangeSeverity::Info,
612612
summary: "New option `llvm.offload-clang-dir` to allow building an in-tree llvm offload and openmp runtime with an external clang.",
613613
},
614+
ChangeInfo {
615+
change_id: 153143,
616+
severity: ChangeSeverity::Warning,
617+
summary: "`x.py test --no-doc` is renamed to `--all-targets`. Additionally `--tests` is added which only executes unit and integration tests.",
618+
},
614619
];

src/doc/rustc-dev-guide/src/tests/intro.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ would require recompiling the entire standard library, and the entirety of
6262
package tests:
6363

6464
* `--doc` — Only runs documentation tests in the package.
65-
* `--no-doc` — Run all tests *except* documentation tests.
65+
* `--all-targets` — Run all tests *except* documentation tests.
66+
* `--tests` — Only runs unit and integration tests
6667

6768
[tidy-unit-tests]: https://github.com/rust-lang/rust/blob/HEAD/src/tools/tidy/src/unit_tests.rs
6869

src/etc/completions/x.fish

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,16 @@ complete -c x -n "__fish_x_using_subcommand test" -l reproducible-artifact -d 'A
329329
complete -c x -n "__fish_x_using_subcommand test" -l set -d 'override options in bootstrap.toml' -r -f
330330
complete -c x -n "__fish_x_using_subcommand test" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}"
331331
complete -c x -n "__fish_x_using_subcommand test" -l no-fail-fast -d 'run all tests regardless of failure'
332-
complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'do not run doc tests'
333-
complete -c x -n "__fish_x_using_subcommand test" -l doc -d 'only run doc tests'
332+
complete -c x -n "__fish_x_using_subcommand test" -l all-targets -d 'Run all test targets (no doc tests)'
333+
complete -c x -n "__fish_x_using_subcommand test" -l doc -d 'Only run doc tests'
334+
complete -c x -n "__fish_x_using_subcommand test" -l tests -d 'Only run unit and integration tests'
334335
complete -c x -n "__fish_x_using_subcommand test" -l bless -d 'whether to automatically update stderr/stdout files'
335336
complete -c x -n "__fish_x_using_subcommand test" -l force-rerun -d 'rerun tests even if the inputs are unchanged'
336337
complete -c x -n "__fish_x_using_subcommand test" -l only-modified -d 'only run tests that result has been changed'
337338
complete -c x -n "__fish_x_using_subcommand test" -l rustfix-coverage -d 'enable this to generate a Rustfix coverage file, which is saved in `/<build_base>/rustfix_missing_coverage.txt`'
338339
complete -c x -n "__fish_x_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests'
339340
complete -c x -n "__fish_x_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives'
341+
complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
340342
complete -c x -n "__fish_x_using_subcommand test" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
341343
complete -c x -n "__fish_x_using_subcommand test" -s i -l incremental -d 'use incremental compilation'
342344
complete -c x -n "__fish_x_using_subcommand test" -l include-default-paths -d 'include default paths in addition to the provided ones'
@@ -374,8 +376,10 @@ complete -c x -n "__fish_x_using_subcommand miri" -l reproducible-artifact -d 'A
374376
complete -c x -n "__fish_x_using_subcommand miri" -l set -d 'override options in bootstrap.toml' -r -f
375377
complete -c x -n "__fish_x_using_subcommand miri" -l ci -d 'Make bootstrap to behave as it\'s running on the CI environment or not' -r -f -a "{true\t'',false\t''}"
376378
complete -c x -n "__fish_x_using_subcommand miri" -l no-fail-fast -d 'run all tests regardless of failure'
377-
complete -c x -n "__fish_x_using_subcommand miri" -l no-doc -d 'do not run doc tests'
378-
complete -c x -n "__fish_x_using_subcommand miri" -l doc -d 'only run doc tests'
379+
complete -c x -n "__fish_x_using_subcommand miri" -l all-targets -d 'Run all test targets (no doc tests)'
380+
complete -c x -n "__fish_x_using_subcommand miri" -l doc -d 'Only run doc tests'
381+
complete -c x -n "__fish_x_using_subcommand miri" -l tests -d 'Only run unit and integration tests'
382+
complete -c x -n "__fish_x_using_subcommand miri" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
379383
complete -c x -n "__fish_x_using_subcommand miri" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
380384
complete -c x -n "__fish_x_using_subcommand miri" -s i -l incremental -d 'use incremental compilation'
381385
complete -c x -n "__fish_x_using_subcommand miri" -l include-default-paths -d 'include default paths in addition to the provided ones'

src/etc/completions/x.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,16 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock {
376376
[CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml')
377377
[CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not')
378378
[CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure')
379-
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests')
380-
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests')
379+
[CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)')
380+
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests')
381+
[CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests')
381382
[CompletionResult]::new('--bless', '--bless', [CompletionResultType]::ParameterName, 'whether to automatically update stderr/stdout files')
382383
[CompletionResult]::new('--force-rerun', '--force-rerun', [CompletionResultType]::ParameterName, 'rerun tests even if the inputs are unchanged')
383384
[CompletionResult]::new('--only-modified', '--only-modified', [CompletionResultType]::ParameterName, 'only run tests that result has been changed')
384385
[CompletionResult]::new('--rustfix-coverage', '--rustfix-coverage', [CompletionResultType]::ParameterName, 'enable this to generate a Rustfix coverage file, which is saved in `/<build_base>/rustfix_missing_coverage.txt`')
385386
[CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests')
386387
[CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives')
388+
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
387389
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
388390
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
389391
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')
@@ -428,8 +430,10 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock {
428430
[CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'override options in bootstrap.toml')
429431
[CompletionResult]::new('--ci', '--ci', [CompletionResultType]::ParameterName, 'Make bootstrap to behave as it''s running on the CI environment or not')
430432
[CompletionResult]::new('--no-fail-fast', '--no-fail-fast', [CompletionResultType]::ParameterName, 'run all tests regardless of failure')
431-
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'do not run doc tests')
432-
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'only run doc tests')
433+
[CompletionResult]::new('--all-targets', '--all-targets', [CompletionResultType]::ParameterName, 'Run all test targets (no doc tests)')
434+
[CompletionResult]::new('--doc', '--doc', [CompletionResultType]::ParameterName, 'Only run doc tests')
435+
[CompletionResult]::new('--tests', '--tests', [CompletionResultType]::ParameterName, 'Only run unit and integration tests')
436+
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
433437
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
434438
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
435439
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')

0 commit comments

Comments
 (0)