Skip to content

Commit

Permalink
test llvm_out behaviour
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Feb 7, 2024
1 parent 7fb4512 commit 63cc3c7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/bootstrap/src/core/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"]);
Expand Down

0 comments on commit 63cc3c7

Please sign in to comment.