From dbab49d48d07893b59d274e582a6f81a1b0222d0 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 11 Oct 2019 17:31:57 +0200 Subject: [PATCH] Try Lucet as a last option, after wasmer, due to its unstable interface --- test/default/wasi-test-wrapper.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/default/wasi-test-wrapper.sh b/test/default/wasi-test-wrapper.sh index 423a7d43..69d9e6ce 100755 --- a/test/default/wasi-test-wrapper.sh +++ b/test/default/wasi-test-wrapper.sh @@ -8,6 +8,12 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmtime" ]; then fi fi +if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmer" ]; then + if command -v wasmer >/dev/null; then + wasmer run "$1" --backend "${WASMER_BACKEND:-cranelift}" --dir=. && exit 0 + 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 \ @@ -18,11 +24,5 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "lucet" ]; then fi fi -if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmer" ]; then - if command -v wasmer >/dev/null; then - wasmer run "$1" --backend "${WASMER_BACKEND:-cranelift}" --dir=. && exit 0 - fi -fi - echo "WebAssembly runtime failed" >&2 exit 1