Commit Graph

5 Commits

Author SHA1 Message Date
Dan Gohman
1c55eb1a8b Add a few CLI tests for WASI. (#1281)
While here, move rs2wasm-add-func.wat into the same directory as the
other .wat tests to keep things tidy.
2020-03-18 15:41:58 -07:00
Alex Crichton
c1ef0db027 Ignore a test failing on CI (#1302)
This'll get fixed in #1298 but for now let's get CI working again
2020-03-12 13:29:42 -05:00
Dan Gohman
d44384da8a Exit with a more severe error code if the program traps. (#1274)
* Exit with a more severe error code if the program traps.

Previously, the wasmtime CLI would return with a regular failure
error code, such as 1 on Unix. However, a program trap indicates a bug
in the program, which can be useful to distinguish from a simple error
status. Check for the trap case, and return an appropriate OS-specific
exit status.

* Use a loop to iterate over the error causes to find Traps.

* Use anyhow's `chain()` iterator.

* For completeness, handle non-Unix and non-Windows platforms too.

* Add a CLI test for a trapping program.

* Replace a manual `.cause` loop with a `.is` call.

* Correct the expected exit status on Windows.

* Use assert_eq/assert_ne so that if these fail, it prints the output.
2020-03-11 13:12:26 -07:00
Alex Crichton
f7c2a58d23 Disable caches in CLI tests (#1204)
Avoids creating extraneous directories while testing in your home
directory.

Closes #1197
2020-03-02 11:43:47 -06:00
Yury Delendik
a8cad05e80 Fix 'not enough arguments' during wasmtime run (#858)
* Fix 'not enough arguments' during wasmtime run

* add simple cli smoke tests

* autogenerate wasm
2020-01-30 14:29:50 +01:00