diff --git a/contrib/_test.sh b/contrib/_test.sh index 7303a5d..38c7315 100755 --- a/contrib/_test.sh +++ b/contrib/_test.sh @@ -86,15 +86,6 @@ if [ "$DO_DOCS" = true ]; then RUSTDOCFLAGS="-D warnings" cargo +stable doc --all-features fi -# Webassembly stuff -if [ "$DO_WASM" = true ]; then - clang --version - CARGO_TARGET_DIR=wasm cargo install --force wasm-pack - printf '\n[lib]\ncrate-type = ["cdylib", "rlib"]\n' >> Cargo.toml - CC=clang wasm-pack build - CC=clang wasm-pack test --node -fi - # Address Sanitizer if [ "$DO_ASAN" = true ]; then clang --version diff --git a/contrib/test.sh b/contrib/test.sh index 109601f..cd742e2 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -4,4 +4,18 @@ set -ex REPO_DIR=$(git rev-parse --show-toplevel) +# Webassembly stuff +# +# The wasm-pack command does not correctly pass args to cargo so we cannot use --locked and test +# with per-commited lockfiles (recent/minimal). Just run the WASM tests from here instead. +if [ "$DO_WASM" = true ]; then + clang --version + CARGO_TARGET_DIR=wasm cargo install --force wasm-pack + printf '\n[lib]\ncrate-type = ["cdylib", "rlib"]\n' >> Cargo.toml + CC=clang wasm-pack build + CC=clang wasm-pack test --node + + exit 0 +fi + $REPO_DIR/contrib/_test.sh