test llvm_out behaviour

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan 2024-02-07 09:47:34 +03:00
parent 7fb4512ee8
commit 63cc3c7b8f

View File

@ -524,6 +524,23 @@ mod dist {
);
}
#[test]
fn llvm_out_behaviour() {
let mut config = configure(&["A"], &["B"]);
config.llvm_from_ci = true;
let build = Build::new(config.clone());
let target = TargetSelection::from_user("A");
assert!(build.llvm_out(target).ends_with("ci-llvm"));
let target = TargetSelection::from_user("B");
assert!(build.llvm_out(target).ends_with("llvm"));
config.llvm_from_ci = false;
let build = Build::new(config.clone());
let target = TargetSelection::from_user("A");
assert!(build.llvm_out(target).ends_with("llvm"));
}
#[test]
fn build_with_empty_host() {
let config = configure(&[], &["C"]);