Simplify #[test] generation for *.wast files (#507)

This commit simplifies the build script slightly for generating tests by
doing a few dull refactorings:

* Leaves formatting to `rustfmt`
* Extract bulk of code execution into a top-level shared `run_wast`
  function so each test is a one-liner
* Use `anyhow` for errors both in the script and in tests
This commit is contained in:
Alex Crichton
2019-11-07 17:01:17 -06:00
committed by GitHub
parent f579dac34f
commit 59b15eab13
3 changed files with 103 additions and 111 deletions

View File

@@ -38,6 +38,9 @@ libc = "0.2.60"
rayon = "1.1"
wasm-webidl-bindings = "0.6"
[build-dependencies]
anyhow = "1.0.19"
[workspace]
members = [
"misc/wasmtime-rust",