enable download_ci_llvm
test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
ecf2d1fa4b
commit
ac20242fbb
@ -10,6 +10,7 @@
|
|||||||
use super::flags::Flags;
|
use super::flags::Flags;
|
||||||
use super::{ChangeIdWrapper, Config};
|
use super::{ChangeIdWrapper, Config};
|
||||||
use crate::core::build_steps::clippy::get_clippy_rules_in_order;
|
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};
|
use crate::core::config::{LldMode, Target, TargetSelection, TomlConfig};
|
||||||
|
|
||||||
pub(crate) fn parse(config: &str) -> Config {
|
pub(crate) fn parse(config: &str) -> Config {
|
||||||
@ -19,13 +20,22 @@ pub(crate) fn parse(config: &str) -> Config {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Resume this test after establishing a stabilized change tracking logic.
|
|
||||||
#[ignore]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn download_ci_llvm() {
|
fn download_ci_llvm() {
|
||||||
assert!(parse("").llvm_from_ci);
|
let config = parse("");
|
||||||
assert!(parse("llvm.download-ci-llvm = true").llvm_from_ci);
|
let is_available = llvm::is_ci_llvm_available(&config, config.llvm_assertions);
|
||||||
assert!(!parse("llvm.download-ci-llvm = false").llvm_from_ci);
|
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\"");
|
let if_unchanged_config = parse("llvm.download-ci-llvm = \"if-unchanged\"");
|
||||||
if if_unchanged_config.llvm_from_ci {
|
if if_unchanged_config.llvm_from_ci {
|
||||||
|
Loading…
Reference in New Issue
Block a user