1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

Run the WASI checks using wasmtime

This commit is contained in:
Frank Denis 2019-04-08 21:45:08 +02:00
parent c21fa570f6
commit 9dbf03c115
4 changed files with 12 additions and 2 deletions

View File

@ -809,6 +809,7 @@ AS_IF([test "x$EMSCRIPTEN" != "x"],[
])
AC_SUBST(TEST_LDFLAGS)
AM_CONDITIONAL([EMSCRIPTEN], [test "x$EMSCRIPTEN" != "x"])
AM_CONDITIONAL([WASI], [test "x$WASI" != "x"])
AC_DEFINE([CONFIGURED], [1], [the build system was properly configured])

View File

@ -21,7 +21,7 @@ export STRIP="llvm-strip"
make distclean > /dev/null
grep -q -F -- '-wasi' build-aux/config.sub || \
sed -i -e 's/-nacl\*)/-nacl*|-wasi/' build-aux/config.sub
sed -i -e 's/-nacl\*)/-nacl*|-wasi)/' build-aux/config.sub
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
@ -36,6 +36,7 @@ fi
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
PROCESSORS=${NPROCESSORS:-3}
make -j${PROCESSORS} install || exit 1
make -j${PROCESSORS} check || exit 1
make install || exit 1
make distclean > /dev/null

View File

@ -497,6 +497,10 @@ TESTS_TARGETS += \
xchacha20
endif
if WASI
LOG_COMPILER = ./wasi-test-wrapper.sh
endif
verify: check
@VALGRIND_CHECK_RULES@

View File

@ -0,0 +1,4 @@
#! /bin/sh
wasmtime --dir=. "$1"