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

Use a specific "done" file for every javascript target

This commit is contained in:
Frank Denis 2016-04-06 15:05:59 +02:00
parent 50a8c61086
commit 99576d46d0
2 changed files with 8 additions and 5 deletions

2
.gitignore vendored
View File

@ -60,7 +60,9 @@ src/curvecp/curvecpserver
src/libsodium/*.def
src/libsodium/include/sodium/version.h
stamp-*
test/browser-js.done
test/js.done
test/js-sumo.done
test/default/browser
test/default/*.res
test/default/*.trs

View File

@ -10,21 +10,22 @@ export EXPORTED_FUNCTIONS="$EXPORTED_FUNCTIONS_STANDARD"
if [ "x$1" = "x--sumo" ]; then
export EXPORTED_FUNCTIONS="$EXPORTED_FUNCTIONS_SUMO"
export PREFIX="$(pwd)/libsodium-js-sumo"
export DONE_FILE='test/js-sumo.done'
else
export PREFIX="$(pwd)/libsodium-js"
export DONE_FILE='test/js.done'
fi
export JS_EXPORTS_FLAGS="-s EXPORTED_FUNCTIONS=${EXPORTED_FUNCTIONS}"
if [ "x$1" = "x--browser-tests" ]; then
export BROWSER_TESTS='yes'
export DONE_FILE='test/browser-js.done'
fi
if [ "x$BROWSER_TESTS" != "x" ]; then
echo "Tests will be built to be run in a web browser"
rm -f test/browser-js.done
else
rm -f test/js.done
fi
rm -f "$DONE_FILE"
emconfigure ./configure --enable-minimal --disable-shared --prefix="$PREFIX" \
CFLAGS="-O3" && \
@ -72,7 +73,7 @@ if [ "x$BROWSER_TESTS" != "x" ]; then
sed "s/{{tname}}/${tname}/" index.html.tpl > "browser/${tname}.html"
echo "${tname}.html" >> "browser/tests.txt"
done
touch -r "${PREFIX}/lib/libsodium.js" ../browser-js.done
touch -r "${PREFIX}/lib/libsodium.js" "$DONE_FILE"
)
else
echo 'Running the test suite'
@ -86,7 +87,7 @@ else
done
)
make $MAKE_FLAGS check || exit 1
touch -r "${PREFIX}/lib/libsodium.js" test/js.done
touch -r "${PREFIX}/lib/libsodium.js" "$DONE_FILE"
fi
echo 'Done.'