From 99576d46d05e4f17d2700846a0473321542e9aa3 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Wed, 6 Apr 2016 15:05:59 +0200 Subject: [PATCH] Use a specific "done" file for every javascript target --- .gitignore | 2 ++ dist-build/emscripten.sh | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 1dc5c626..7ada954c 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index 5e1513ad..0546f73d 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -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.'