We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
wasm-abi
cmd
1 parent 68b6bb2 commit 0c1df37Copy full SHA for 0c1df37
tests/run-make/wasm-abi/rmake.rs
@@ -1,9 +1,8 @@
1
//@ only-wasm32-wasip1
2
//@ needs-wasmtime
3
4
-use run_make_support::rustc;
+use run_make_support::{cmd, rustc};
5
use std::path::Path;
6
-use std::process::Command;
7
8
fn main() {
9
rustc().input("foo.rs").target("wasm32-wasip1").run();
@@ -19,14 +18,12 @@ fn main() {
19
18
}
20
21
fn run(file: &Path, method: &str, expected_output: &str) {
22
- let output = Command::new("wasmtime")
+ cmd("wasmtime")
23
.arg("run")
24
.arg("--preload=host=host.wat")
25
.arg("--invoke")
26
.arg(method)
27
.arg(file)
28
- .output()
29
- .unwrap();
30
- assert!(output.status.success());
31
- assert_eq!(expected_output, String::from_utf8_lossy(&output.stdout));
+ .run()
+ .assert_stdout_equals(expected_output);
32
0 commit comments