Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 1 addition & 25 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1320,31 +1320,7 @@ impl Config {

// Set flags.
config.paths = std::mem::take(&mut flags.paths);
config.skip = flags
.skip
.into_iter()
.chain(flags.exclude)
.map(|p| {
let p = 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
})
Comment on lines -1341 to -1345
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly why we don't include top-level paths here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue is that --exclude also works for non-compiletest managed test suites, like library/test or library/core.

Anyway, I'll have to look at this a bit more, because I think there's a distinction between how tests/* suites are matched versus how e.g. library/test is matched in --exclude logic...

.collect();

config.skip = flags.skip.into_iter().chain(flags.exclude).collect();
config.include_default_paths = flags.include_default_paths;
config.rustc_error_format = flags.rustc_error_format;
config.json_output = flags.json_output;
Expand Down
Loading