Skip to content

Commit

Permalink
test: Add integration test for exelinkflags
Browse files Browse the repository at this point in the history
  • Loading branch information
allenli873 committed Nov 28, 2024
1 parent a0537d7 commit 034e460
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
zlib/1.3
libxml2/2.11.4
openssl/3.1.3
lightgbm/4.3.0
15 changes: 15 additions & 0 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,18 @@ fn host_and_build_profiles() {
std::io::stderr().write_all(output.stderr()).unwrap();
assert!(output.is_success());
}

#[test]
fn test_shared_and_exe_link_flags() {
let output = ConanInstall::with_recipe(Path::new("tests/conanfile.txt"))
.output_folder(Path::new(env!("CARGO_TARGET_TMPDIR")))
.detect_profile()
.build("missing")
.verbosity(ConanVerbosity::Debug)
.run();

assert!(output.is_success());
let cargo = output.parse();
let emitted_instructions = String::from_utf8(cargo.as_bytes().to_vec()).expect("Invalid UTF-8");
assert!(emitted_instructions.contains("cargo:rustc-link-arg-bins=-fopenmp"));
}

0 comments on commit 034e460

Please sign in to comment.