mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Improved runtime_c_api_tests
This commit is contained in:
parent
052ad1381d
commit
2c6fbcba1f
@ -4,19 +4,17 @@ use std::process::Command;
|
|||||||
fn test_c_api() {
|
fn test_c_api() {
|
||||||
let project_tests_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/tests");
|
let project_tests_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/tests");
|
||||||
|
|
||||||
run_command("cmake", project_tests_dir, Some("."));
|
run_command("cmake", project_tests_dir, vec!["."]);
|
||||||
run_command("make", project_tests_dir, Some("-Wdev -Werror=dev"));
|
run_command("make", project_tests_dir, vec!["-Wdev", "-Werror=dev"]);
|
||||||
run_command("make", project_tests_dir, Some("test VERBOSE=1"));
|
run_command("make", project_tests_dir, vec!["test", "ARGS=\"-V\""]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_command(command_str: &str, dir: &str, arg: Option<&str>) {
|
fn run_command(command_str: &str, dir: &str, args: Vec<&str>) {
|
||||||
println!("Running command: `{}` arg: {:?}", command_str, arg);
|
println!("Running command: `{}` args: {:?}", command_str, args);
|
||||||
|
|
||||||
let mut command = Command::new(command_str);
|
let mut command = Command::new(command_str);
|
||||||
|
|
||||||
if let Some(a) = arg {
|
command.args(&args);
|
||||||
command.arg(a);
|
|
||||||
}
|
|
||||||
|
|
||||||
command.current_dir(dir);
|
command.current_dir(dir);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user