Skip to content

Commit

Permalink
bootstrap: drop warning for top-level test suite path check
Browse files Browse the repository at this point in the history
This doesn't quite handle the more exotic path suffix matches that test
filters seem to accept (e.g. `library/test` can be matched with
`--exclude test`), so avoid warning on non-existent top-level test
suites for now. A proper fix will need to possibly query test `Step`s
for their exclude logic.
  • Loading branch information
jieyouxu committed Dec 28, 2024
1 parent 7cb0849 commit c393811
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1325,23 +1325,14 @@ impl Config {
.into_iter()
.chain(flags.exclude)
.map(|p| {
let p = if cfg!(windows) {
// Never return top-level path here as it would break `--skip`
// logic on rustc's internal test framework which is utilized
// by compiletest.
if cfg!(windows) {
PathBuf::from(p.to_str().unwrap().replace('/', "\\"))
} else {
p
};

// Jump to top-level project path to support passing paths
// from sub directories.
let top_level_path = config.src.join(&p);
if !config.src.join(&top_level_path).exists() {
eprintln!("WARNING: '{}' does not exist.", top_level_path.display());
}

// Never return top-level path here as it would break `--skip`
// logic on rustc's internal test framework which is utilized
// by compiletest.
p
})
.collect();

Expand Down

0 comments on commit c393811

Please sign in to comment.