From 1bafad7899823eea8159f52410398277b0765b93 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 9 Sep 2023 12:50:51 +0200 Subject: [PATCH] Sync wasi-test-wrapper.sh and wintest.bat --- test/default/wasi-test-wrapper.sh | 8 +------- test/default/wintest.bat | 17 +++++++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/test/default/wasi-test-wrapper.sh b/test/default/wasi-test-wrapper.sh index 1adb3385..5c3cea76 100755 --- a/test/default/wasi-test-wrapper.sh +++ b/test/default/wasi-test-wrapper.sh @@ -9,7 +9,7 @@ fi if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmedge" ]; then if command -v wasmedgec >/dev/null && command -v wasmedge >/dev/null; then - wasmedgec "$1" "${1}.so" && + wasmedgec "$1" "${1}.so" >/dev/null && wasmedge --dir=.:. "${1}.so" && rm -f "${1}.so" && exit 0 @@ -28,12 +28,6 @@ if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wasmtime" ]; then fi fi -if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "wavm" ]; then - if command -v wavm >/dev/null; then - wavm run --abi=wasi "$1" && exit 0 - fi -fi - if [ -z "$WASI_RUNTIME" ] || [ "$WASI_RUNTIME" = "bun" ]; then if echo | bun help >/dev/null 2>&1; then { diff --git a/test/default/wintest.bat b/test/default/wintest.bat index e50fb494..4a22edad 100755 --- a/test/default/wintest.bat +++ b/test/default/wintest.bat @@ -1,7 +1,7 @@ @ECHO OFF if "%1" == "" ( - echo "Usage: wintest.bat [ ]" goto :END ) @@ -13,7 +13,8 @@ if not exist sodium_version.c ( ) ) -if "%2" == "x64" (SET ARCH=x64) else (SET ARCH=Win32) +if "%2" == "x64" (SET ARCH=x64) else if "%2" == "ARM64" (SET ARCH=ARM64) else (SET ARCH=ARM64) +if "%2" == "ARM64" (SET CROSSCOMPILE=1) else (SET CROSSCOMPILE=0) SET CFLAGS=/nologo /DTEST_SRCDIR=\".\" /I..\..\src\libsodium\include\sodium /I..\..\src\libsodium\include /I..\quirks SET LDFLAGS=/link /LTCG advapi32.lib ..\..\Build\%1\%ARCH%\libsodium.lib if "%1" == "ReleaseDLL" ( goto :ReleaseDLL ) @@ -44,11 +45,15 @@ FOR %%f in (*.c) DO ( echo %%f compile failed goto :END ) - %%f.exe - if errorlevel 1 ( - echo %%f failed + if %CROSSCOMPILE% == 1 ( + echo %%f skipped ) else ( - echo %%f ok + %%f.exe + if errorlevel 1 ( + echo %%f failed + ) else ( + echo %%f ok + ) ) ) REM Remove temporary files