Skip to content

Commit f8ed52f

Browse files
committed
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. If someone needs to use --skip for something other than compiletest, they can use `--test-args --skip` instead.
1 parent e5a7d8f commit f8ed52f

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

src/bootstrap/builder/tests.rs

-2
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,6 @@ mod dist {
547547
config.stage = 0;
548548
config.cmd = Subcommand::Test {
549549
paths: vec!["library/std".into()],
550-
skip: vec![],
551550
test_args: vec![],
552551
rustc_args: vec![],
553552
fail_fast: true,
@@ -618,7 +617,6 @@ mod dist {
618617
let mut config = configure(&["A"], &["A"]);
619618
config.cmd = Subcommand::Test {
620619
paths: vec![],
621-
skip: vec![],
622620
test_args: vec![],
623621
rustc_args: vec![],
624622
fail_fast: true,

src/bootstrap/flags.rs

-12
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ pub enum Subcommand {
115115
compare_mode: Option<String>,
116116
pass: Option<String>,
117117
run: Option<String>,
118-
skip: Vec<String>,
119118
test_args: Vec<String>,
120119
rustc_args: Vec<String>,
121120
fail_fast: bool,
@@ -568,7 +567,6 @@ Arguments:
568567
compare_mode: matches.opt_str("compare-mode"),
569568
pass: matches.opt_str("pass"),
570569
run: matches.opt_str("run"),
571-
skip: matches.opt_strs("skip"),
572570
test_args: matches.opt_strs("test-args"),
573571
rustc_args: matches.opt_strs("rustc-args"),
574572
fail_fast: !matches.opt_present("no-fail-fast"),
@@ -707,16 +705,6 @@ impl Subcommand {
707705
pub fn test_args(&self) -> Vec<&str> {
708706
let mut args = vec![];
709707

710-
match *self {
711-
Subcommand::Test { ref skip, .. } => {
712-
for s in skip {
713-
args.push("--skip");
714-
args.push(s.as_str());
715-
}
716-
}
717-
_ => (),
718-
};
719-
720708
match *self {
721709
Subcommand::Test { ref test_args, .. } | Subcommand::Bench { ref test_args, .. } => {
722710
args.extend(test_args.iter().flat_map(|s| s.split_whitespace()))

src/bootstrap/test.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,11 @@ note: if you're sure you want to do this, please open an issue as to why. In the
14881488
cmd.arg("--run-clang-based-tests-with").arg(clang_exe);
14891489
}
14901490

1491+
for exclude in &builder.config.exclude {
1492+
cmd.arg("--skip");
1493+
cmd.arg(&exclude.path);
1494+
}
1495+
14911496
// Get paths from cmd args
14921497
let paths = match &builder.config.cmd {
14931498
Subcommand::Test { ref paths, .. } => &paths[..],

0 commit comments

Comments
 (0)