Closed
Description
$ x t src/test/ui --exclude src/test/ui
Skipping Suite(test::src/test/ui) because it is excluded
Skipping Suite(test::src/test/ui) because it is excluded
$ x t src/test/ui/attr-start.rs --exclude src/test/ui/attr-start.rs
Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu) -> x86_64-unknown-linux-gnu(x86_64-unknown-linux-gnu))
running 1 test
.
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 12951 filtered out; finished in 0.09s
This is harder to fix than it looks - if you try something simple like
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 0c4f3265dbf..e0acf20ae48 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -225,8 +225,8 @@ fn maybe_run(&self, builder: &Builder<'_>, pathset: &PathSet) {
}
}
- fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
- if builder.config.exclude.iter().any(|e| pathset.has(&e.path, e.kind)) {
+ fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet, should_run: &ShouldRun) -> bool {
+ if builder.config.exclude.iter().any(|e| pathset.has(&e.path, e.kind) || should_run.is_suite_path(&e.path).is_some()) {
eprintln!("Skipping {:?} because it is excluded", pathset);
return true;
}
you end up skipping the whole suite:
Skipping Suite(test::src/test/ui) because it is excluded
Skipping Suite(test::src/test/ui) because it is excluded
I think the proper fix for this involves adding support in compiletest itself :( by passing --exclude p
for each is_valid_test_suite_arg
in config.exclude
.
@rustbot label +A-rustbuild +A-testsuite +C-bug +E-hard