Skip to content

Commit

Permalink
Auto merge of rust-lang#134845 - jieyouxu:temp-drop-warning, r=onur-o…
Browse files Browse the repository at this point in the history
…zkan

bootstrap: drop warning for top-level test suite path check due to false positives

The current top-level test suite directory does not exist warning logic 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. To avoid false positives, we probably need to query test `Step`s for their `should_run(exclude_filter)` logic.

This retains the fix for the Windows path handling (unlike rust-lang#134843).

r? `@onur-ozkan`
  • Loading branch information
bors committed Dec 28, 2024
2 parents ceb0441 + c393811 commit 8742e05
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 8742e05

Please sign in to comment.