From 312bb605ee6db94f5f3583d3001e2aa8b2f2c16a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 10 Mar 2021 18:45:05 +0100 Subject: [PATCH] Move lucet down --- test/default/wasi-test-wrapper.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/default/wasi-test-wrapper.sh b/test/default/wasi-test-wrapper.sh index 3fb80d56..8e0c5d7f 100755 --- a/test/default/wasi-test-wrapper.sh +++ b/test/default/wasi-test-wrapper.sh @@ -47,18 +47,6 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "ssvm" ]; then fi fi -if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "lucet" ]; then - if command -v lucetc-wasi >/dev/null && command -v lucet-wasi >/dev/null; then - lucetc-wasi \ - --target-cpu native \ - --reserved-size "4GiB" \ - --opt-level speed \ - "$1" -o "${1}.so" && - lucet-wasi --dir=.:. --max-heap-size "${MAX_MEMORY_TESTS}" "${1}.so" && - rm -f "${1}.so" && exit 0 - fi -fi - if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "node" ]; then if echo | node --experimental-wasi-unstable-preview1 >/dev/null 2>&1; then { @@ -81,5 +69,17 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmer-js" ]; then fi fi +if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "lucet" ]; then + if command -v lucetc-wasi >/dev/null && command -v lucet-wasi >/dev/null; then + lucetc-wasi \ + --target-cpu native \ + --reserved-size "4GiB" \ + --opt-level speed \ + "$1" -o "${1}.so" && + lucet-wasi --dir=.:. --max-heap-size "${MAX_MEMORY_TESTS}" "${1}.so" && + rm -f "${1}.so" && exit 0 + fi +fi + echo "WebAssembly runtime failed" >&2 exit 1