Skip to content

Commit 756fc61

Browse files
committed
Revert "Rollup merge of rust-lang#134209 - onur-ozkan:check-skip-paths, r=jieyouxu"
Unfortunately, the preset logic is not quite right because `Step`s are allowed to register arbitrary *aliases* (e.g. `library/test` is aliases to `test`), which means that we incorrectly warn on ``` ./x test --exclude test ``` producing ``` WARNING: '/home/joe/repos/rust/test' does not exist. ``` even though this alias (`test`) is indeed a known and handled `--exclude` filter. A proper fix will need to do something like "collect all eligible `Step`s then check `should_run(exclude)`" in order to determine if the exclude filter will trigger for the steps. (Courtesy of jyn pointing this out.) This reverts commit 6cf13b0, reversing changes made to 2846699.
1 parent ecc1899 commit 756fc61

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

src/bootstrap/src/core/config/config.rs

+1-25
Original file line numberDiff line numberDiff line change
@@ -1320,31 +1320,7 @@ impl Config {
13201320

13211321
// Set flags.
13221322
config.paths = std::mem::take(&mut flags.paths);
1323-
config.skip = flags
1324-
.skip
1325-
.into_iter()
1326-
.chain(flags.exclude)
1327-
.map(|p| {
1328-
let p = if cfg!(windows) {
1329-
PathBuf::from(p.to_str().unwrap().replace('/', "\\"))
1330-
} else {
1331-
p
1332-
};
1333-
1334-
// Jump to top-level project path to support passing paths
1335-
// from sub directories.
1336-
let top_level_path = config.src.join(&p);
1337-
if !config.src.join(&top_level_path).exists() {
1338-
eprintln!("WARNING: '{}' does not exist.", top_level_path.display());
1339-
}
1340-
1341-
// Never return top-level path here as it would break `--skip`
1342-
// logic on rustc's internal test framework which is utilized
1343-
// by compiletest.
1344-
p
1345-
})
1346-
.collect();
1347-
1323+
config.skip = flags.skip.into_iter().chain(flags.exclude).collect();
13481324
config.include_default_paths = flags.include_default_paths;
13491325
config.rustc_error_format = flags.rustc_error_format;
13501326
config.json_output = flags.json_output;

0 commit comments

Comments
 (0)