mirror of
https://github.com/openharmony/third_party_rust_libloading.git
synced 2026-07-19 13:16:19 -04:00
Tests read TARGET environment variable for helpers
This commit is contained in:
+11
-8
@@ -14,14 +14,17 @@ fn make_helpers() {
|
||||
cmd
|
||||
.arg("src/test_helpers.rs")
|
||||
.arg("-o")
|
||||
.arg(LIBPATH)
|
||||
// .arg("--target")
|
||||
// .arg(env!("LIBLOADING_TEST_TARGET"))
|
||||
.arg("-O");
|
||||
|
||||
cmd
|
||||
.output()
|
||||
.expect("could not compile the test helpers!");
|
||||
.arg(LIBPATH);
|
||||
if let Some(target) = std::env::var_os("TARGET") {
|
||||
cmd.arg("--target").arg(target);
|
||||
} else {
|
||||
eprintln!("WARNING: $TARGET NOT SPECIFIED! BUILDING HELPER MODULE FOR NATIVE TARGET.");
|
||||
}
|
||||
assert!(cmd
|
||||
.status()
|
||||
.expect("could not compile the test helpers!")
|
||||
.success()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user