Skip to content

Commit

Permalink
Updated the Python WASI runner test to check for a specific exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-F-Bryan committed Mar 6, 2023
1 parent 43116e9 commit 20c10bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/wasi/tests/runners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ mod wasi {
let tasks = TokioTaskManager::new(Handle::current());
let container = WapmContainer::from_bytes(webc).unwrap();

// Note: we don't have any way to intercept stdin or stdout, so blindly
// assume that everything is fine if it runs successfully.
let handle = std::thread::spawn(move || {
WasiRunner::new(store)
.with_task_manager(tasks)
.with_args(["-c", "import sys; sys.exit(42)"])
.run_cmd(&container, "python")
});
let err = handle.join().unwrap().unwrap_err();
Expand Down

0 comments on commit 20c10bc

Please sign in to comment.