Skip to content

Commit

Permalink
Wrapping non zero exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacarte committed Nov 21, 2023
1 parent 346c43c commit 61b1c09
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions host_based/bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,19 @@ fn single_pass(input_wasm: &PathBuf, output: bool) {
.typed::<(), ()>(&mut store)
.unwrap();

func.call(&mut store, ())
.unwrap();


let r = func.call(&mut store, ());
let execution_elapsed = now.elapsed().as_nanos();

match r {
Ok(_) => {
println!("Execution succeeded");
}
Err(e) => {
println!("Execution return exit code: {:?}", e);
}
}

if output {
eprint!("{}," , pathcp.display());
eprint!("{},", wsize);
Expand Down

0 comments on commit 61b1c09

Please sign in to comment.