Skip to content

Commit

Permalink
Rollup merge of rust-lang#131659 - onur-ozkan:llvm-test, r=albertlars…
Browse files Browse the repository at this point in the history
…an68

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
  • Loading branch information
matthiaskrgr authored Oct 13, 2024
2 parents 20add51 + ac20242 commit 0e00a70
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/bootstrap/src/core/config/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use serde::Deserialize;
use super::flags::Flags;
use super::{ChangeIdWrapper, Config};
use crate::core::build_steps::clippy::get_clippy_rules_in_order;
use crate::core::build_steps::llvm;
use crate::core::config::{LldMode, Target, TargetSelection, TomlConfig};

pub(crate) fn parse(config: &str) -> Config {
Expand All @@ -19,13 +20,22 @@ pub(crate) fn parse(config: &str) -> Config {
)
}

// FIXME: Resume this test after establishing a stabilized change tracking logic.
#[ignore]
#[test]
fn download_ci_llvm() {
assert!(parse("").llvm_from_ci);
assert!(parse("llvm.download-ci-llvm = true").llvm_from_ci);
assert!(!parse("llvm.download-ci-llvm = false").llvm_from_ci);
let config = parse("");
let is_available = llvm::is_ci_llvm_available(&config, config.llvm_assertions);
if is_available {
assert!(config.llvm_from_ci);
}

let config = parse("llvm.download-ci-llvm = true");
let is_available = llvm::is_ci_llvm_available(&config, config.llvm_assertions);
if is_available {
assert!(config.llvm_from_ci);
}

let config = parse("llvm.download-ci-llvm = false");
assert!(!config.llvm_from_ci);

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

0 comments on commit 0e00a70

Please sign in to comment.