builtins: build the Wasm interpreter from inside run-wasm-tests.sh

This commit is contained in:
Brian Carroll 2022-12-16 16:05:00 +00:00
parent 66aaa7c73c
commit 62269bf6c9
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
2 changed files with 3 additions and 6 deletions

View file

@ -3,9 +3,6 @@
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -euxo pipefail
# Test failures will always point at the _start function
# Make sure to look at the rest of the stack trace!
# Zig will try to run the test binary it produced, but since your OS doesn't know how to
# run Wasm binaries natively, we need to provide a Wasm interpreter as a "test command".
# For non-native binaries, Zig test needs a "test command" it can use
cargo build --locked --release -p roc_wasm_interp
zig test -target wasm32-wasi-musl -O ReleaseFast src/main.zig --test-cmd ../../../../target/release/roc_wasm_interp --test-cmd-bin