mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-25 06:31:32 +00:00
Run WASI C API tests based on feature; prevent cmake caching
This commit is contained in:
@ -4,7 +4,14 @@ use std::process::Command;
|
||||
fn test_c_api() {
|
||||
let project_tests_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/tests");
|
||||
|
||||
run_command("cmake", project_tests_dir, vec!["."]);
|
||||
let cmake_args = vec![
|
||||
".",
|
||||
#[cfg(feature = "wasi")]
|
||||
"-DWASI_TESTS=ON",
|
||||
];
|
||||
// we use -f so it doesn't fail if the fiel doesn't exist
|
||||
run_command("rm", project_tests_dir, vec!["-f", "CMakeCache.txt"]);
|
||||
run_command("cmake", project_tests_dir, cmake_args);
|
||||
run_command("make", project_tests_dir, vec!["-Wdev", "-Werror=dev"]);
|
||||
run_command("make", project_tests_dir, vec!["test", "ARGS=\"-V\""]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user