diff options
| author | bors <bors@rust-lang.org> | 2022-08-07 02:56:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-07 02:56:48 +0000 |
| commit | 24cf45a591481519cb0116bf2ce111ffb3e1111c (patch) | |
| tree | ae3f1e4178759e8006d879c9f8fd881b150dc214 | |
| parent | cc71eef498a24af884c4ffa288101a73447bfc61 (diff) | |
| parent | f8ed52f6fda7fea1e7045d4f5d9907ffaff6c392 (diff) | |
| download | rust-24cf45a591481519cb0116bf2ce111ffb3e1111c.tar.gz rust-24cf45a591481519cb0116bf2ce111ffb3e1111c.zip | |
Auto merge of #100004 - jyn514:exclude-single-test, r=Mark-Simulacrum
Move `x test --skip` to be part of `--exclude` `--skip` is inconsistent with the rest of the interface and redundant with `--exclude`. Fix --exclude to work properly for files and directories rather than having a separate flag. Fixes https://github.com/rust-lang/rust/issues/96342. cc https://github.com/rust-lang/rust/pull/96493#issuecomment-1200521720 r? `@Mark-Simulacrum`
| -rw-r--r-- | src/bootstrap/builder/tests.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/flags.rs | 12 | ||||
| -rw-r--r-- | src/bootstrap/test.rs | 5 |
3 files changed, 5 insertions, 14 deletions
diff --git a/src/bootstrap/builder/tests.rs b/src/bootstrap/builder/tests.rs index c084e77d3a9..280eba75f0c 100644 --- a/src/bootstrap/builder/tests.rs +++ b/src/bootstrap/builder/tests.rs @@ -547,7 +547,6 @@ mod dist { config.stage = 0; config.cmd = Subcommand::Test { paths: vec!["library/std".into()], - skip: vec![], test_args: vec![], rustc_args: vec![], fail_fast: true, @@ -618,7 +617,6 @@ mod dist { let mut config = configure(&["A"], &["A"]); config.cmd = Subcommand::Test { paths: vec![], - skip: vec![], test_args: vec![], rustc_args: vec![], fail_fast: true, diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 80b3bcce860..39d9ce1621b 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -115,7 +115,6 @@ pub enum Subcommand { compare_mode: Option<String>, pass: Option<String>, run: Option<String>, - skip: Vec<String>, test_args: Vec<String>, rustc_args: Vec<String>, fail_fast: bool, @@ -568,7 +567,6 @@ Arguments: compare_mode: matches.opt_str("compare-mode"), pass: matches.opt_str("pass"), run: matches.opt_str("run"), - skip: matches.opt_strs("skip"), test_args: matches.opt_strs("test-args"), rustc_args: matches.opt_strs("rustc-args"), fail_fast: !matches.opt_present("no-fail-fast"), @@ -708,16 +706,6 @@ impl Subcommand { let mut args = vec![]; match *self { - Subcommand::Test { ref skip, .. } => { - for s in skip { - args.push("--skip"); - args.push(s.as_str()); - } - } - _ => (), - }; - - match *self { Subcommand::Test { ref test_args, .. } | Subcommand::Bench { ref test_args, .. } => { args.extend(test_args.iter().flat_map(|s| s.split_whitespace())) } diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 05403cf48c7..197821f034f 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1486,6 +1486,11 @@ note: if you're sure you want to do this, please open an issue as to why. In the cmd.arg("--run-clang-based-tests-with").arg(clang_exe); } + for exclude in &builder.config.exclude { + cmd.arg("--skip"); + cmd.arg(&exclude.path); + } + // Get paths from cmd args let paths = match &builder.config.cmd { Subcommand::Test { ref paths, .. } => &paths[..], |
