mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #138245 - onur-ozkan:ci-rustc-test-fix, r=jieyouxu
stabilize `ci_rustc_if_unchanged_logic` test for local environments Fixes #138239
This commit is contained in:
@@ -261,8 +261,14 @@ fn ci_rustc_if_unchanged_logic() {
|
||||
// Make sure "if-unchanged" logic doesn't try to use CI rustc while there are changes
|
||||
// in compiler and/or library.
|
||||
if config.download_rustc_commit.is_some() {
|
||||
let has_changes =
|
||||
config.last_modified_commit(&["compiler", "library"], "download-rustc", true).is_none();
|
||||
let mut paths = vec!["compiler"];
|
||||
|
||||
// Handle library tree the same way as in `Config::download_ci_rustc_commit`.
|
||||
if build_helper::ci::CiEnv::is_ci() {
|
||||
paths.push("library");
|
||||
}
|
||||
|
||||
let has_changes = config.last_modified_commit(&paths, "download-rustc", true).is_none();
|
||||
|
||||
assert!(
|
||||
!has_changes,
|
||||
|
||||
@@ -3018,6 +3018,9 @@ fn download_ci_rustc_commit(
|
||||
// these changes to speed up the build process for library developers. This provides consistent
|
||||
// functionality for library developers between `download-rustc=true` and `download-rustc="if-unchanged"`
|
||||
// options.
|
||||
//
|
||||
// If you update "library" logic here, update `builder::tests::ci_rustc_if_unchanged_logic` test
|
||||
// logic accordingly.
|
||||
if !CiEnv::is_ci() {
|
||||
allowed_paths.push(":!library");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user