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/*.def
src/libsodium/include/sodium/version.h src/libsodium/include/sodium/version.h
stamp-* stamp-*
test/browser-js.done
test/js.done test/js.done
test/js-sumo.done
test/default/browser test/default/browser
test/default/*.res test/default/*.res
test/default/*.trs test/default/*.trs

View File

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