Skip to content

Commit 36337a7

Browse files
authored
Unrolled build for rust-lang#131659
Rollup merge of rust-lang#131659 - onur-ozkan:llvm-test, r=albertlarsan68 enable `download_ci_llvm` test This was ignored because it caused merge failures on [LLVM update PR](rust-lang#131448). The issue was not checking `is_ci_llvm_available` in the test which is crucial for enabling CI LLVM: https://github.com/rust-lang/rust/blob/2aa26d8a722cf8810b27538c24b93d29324d4ac7/src/bootstrap/src/core/config/config.rs#L2835-L2844
2 parents 27861c4 + ac20242 commit 36337a7

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

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

+15-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use serde::Deserialize;
1010
use super::flags::Flags;
1111
use super::{ChangeIdWrapper, Config};
1212
use crate::core::build_steps::clippy::get_clippy_rules_in_order;
13+
use crate::core::build_steps::llvm;
1314
use crate::core::config::{LldMode, Target, TargetSelection, TomlConfig};
1415

1516
pub(crate) fn parse(config: &str) -> Config {
@@ -19,13 +20,22 @@ pub(crate) fn parse(config: &str) -> Config {
1920
)
2021
}
2122

22-
// FIXME: Resume this test after establishing a stabilized change tracking logic.
23-
#[ignore]
2423
#[test]
2524
fn download_ci_llvm() {
26-
assert!(parse("").llvm_from_ci);
27-
assert!(parse("llvm.download-ci-llvm = true").llvm_from_ci);
28-
assert!(!parse("llvm.download-ci-llvm = false").llvm_from_ci);
25+
let config = parse("");
26+
let is_available = llvm::is_ci_llvm_available(&config, config.llvm_assertions);
27+
if is_available {
28+
assert!(config.llvm_from_ci);
29+
}
30+
31+
let config = parse("llvm.download-ci-llvm = true");
32+
let is_available = llvm::is_ci_llvm_available(&config, config.llvm_assertions);
33+
if is_available {
34+
assert!(config.llvm_from_ci);
35+
}
36+
37+
let config = parse("llvm.download-ci-llvm = false");
38+
assert!(!config.llvm_from_ci);
2939

3040
let if_unchanged_config = parse("llvm.download-ci-llvm = \"if-unchanged\"");
3141
if if_unchanged_config.llvm_from_ci {

0 commit comments

Comments
 (0)