Skip to content

Commit e441c97

Browse files
committed
stabilize ci_rustc_if_unchanged_logic test for local environments
Signed-off-by: onur-ozkan <[email protected]>
1 parent efea989 commit e441c97

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/bootstrap/src/core/builder/tests.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,14 @@ fn ci_rustc_if_unchanged_logic() {
261261
// Make sure "if-unchanged" logic doesn't try to use CI rustc while there are changes
262262
// in compiler and/or library.
263263
if config.download_rustc_commit.is_some() {
264-
let has_changes =
265-
config.last_modified_commit(&["compiler", "library"], "download-rustc", true).is_none();
264+
let mut paths = vec!["compiler"];
265+
266+
// Handle library tree the same way as in `Config::download_ci_rustc_commit`.
267+
if !build_helper::ci::CiEnv::is_ci() {
268+
paths.push("library");
269+
}
270+
271+
let has_changes = config.last_modified_commit(&paths, "download-rustc", true).is_none();
266272

267273
assert!(
268274
!has_changes,

0 commit comments

Comments
 (0)