Skip to content

Commit 705c256

Browse files
committed
stabilize ci_rustc_if_unchanged_logic test
Signed-off-by: onur-ozkan <[email protected]>
1 parent 4203c68 commit 705c256

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use super::*;
66
use crate::Flags;
77
use crate::core::build_steps::doc::DocumentationFormat;
88
use crate::core::config::Config;
9+
use crate::core::download::is_download_ci_available;
910

1011
fn configure(cmd: &str, host: &[&str], target: &[&str]) -> Config {
1112
configure_with_args(&[cmd.to_owned()], host, target)
@@ -225,7 +226,9 @@ fn ci_rustc_if_unchanged_logic() {
225226
|&_| Ok(Default::default()),
226227
);
227228

228-
if config.rust_info.is_from_tarball() {
229+
if !is_download_ci_available(&config.build.triple, config.llvm_assertions)
230+
|| config.rust_info.is_from_tarball()
231+
{
229232
return;
230233
}
231234

@@ -257,7 +260,11 @@ fn ci_rustc_if_unchanged_logic() {
257260
.unwrap()
258261
.success();
259262

260-
assert!(has_changes == config.download_rustc_commit.is_none());
263+
// Make sure "if-unchanged" logic doesn't try to use CI rustc while there are changes
264+
// in compiler and/or library.
265+
if config.download_rustc_commit.is_some() {
266+
assert!(!has_changes);
267+
}
261268
}
262269

263270
mod defaults {

0 commit comments

Comments
 (0)