mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
update zig wasm test runner script
This commit is contained in:
parent
77c9bc193b
commit
f587c3b49c
1 changed files with 6 additions and 2 deletions
|
@ -4,6 +4,10 @@ set -euxo pipefail
|
|||
|
||||
# Test failures will always point at the _start function
|
||||
# Make sure to look at the rest of the stack trace!
|
||||
warning_about_non_native_binary=$(zig test -target wasm32-wasi-musl -O ReleaseFast src/main.zig 2>&1)
|
||||
wasm_test_binary=$(echo $warning_about_non_native_binary | cut -d' ' -f 3)
|
||||
|
||||
# Zig will try to run the test binary it produced, but it is a wasm object and hence your OS won't
|
||||
# know how to run it. In the error message, it prints the binary it tried to run. We use some fun
|
||||
# unix tools to get that path, then feed it to wasmer
|
||||
warning_about_non_native_binary=$(zig test -target wasm32-wasi-musl -O ReleaseFast src/main.zig 2>&1) || true
|
||||
wasm_test_binary=$(echo $warning_about_non_native_binary | cut -d' ' -f 35 )
|
||||
wasmer $wasm_test_binary dummyArgForZigTestBinary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue