Skip to content

Commit

Permalink
Unrolled build for rust-lang#122081
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122081 - onur-ozkan:validate-path-remaps, r=clubby789

validate `builder::PATH_REMAP`

self-explanatory

r? clubby789
  • Loading branch information
rust-timer committed Mar 12, 2024
2 parents 7de1a1f + ea22e78 commit e60d67a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/builder.rs
Expand Up @@ -291,7 +291,7 @@ impl PathSet {
const PATH_REMAP: &[(&str, &[&str])] = &[
// config.toml uses `rust-analyzer-proc-macro-srv`, but the
// actual path is `proc-macro-srv-cli`
("rust-analyzer-proc-macro-srv", &["proc-macro-srv-cli"]),
("rust-analyzer-proc-macro-srv", &["src/tools/rust-analyzer/crates/proc-macro-srv-cli"]),
// Make `x test tests` function the same as `x t tests/*`
(
"tests",
Expand Down
13 changes: 13 additions & 0 deletions src/bootstrap/src/core/builder/tests.rs
Expand Up @@ -115,6 +115,19 @@ fn test_intersection() {
assert_eq!(command_paths, vec![Path::new("library/stdarch")]);
}

#[test]
fn validate_path_remap() {
let build = Build::new(configure("test", &["A"], &["A"]));

PATH_REMAP
.iter()
.flat_map(|(_, paths)| paths.iter())
.map(|path| build.src.join(path))
.for_each(|path| {
assert!(path.exists(), "{} should exist.", path.display());
});
}

#[test]
fn test_exclude() {
let mut config = configure("test", &["A"], &["A"]);
Expand Down

0 comments on commit e60d67a

Please sign in to comment.