]> git.codecow.com Git - Monocypher.git/commitdiff
Adapt tests to optional makefile variables
authorLoup Vaillant <loup@loup-vaillant.fr>
Mon, 28 Aug 2023 21:20:05 +0000 (23:20 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Mon, 28 Aug 2023 21:20:05 +0000 (23:20 +0200)
tests/test.sh

index 04b2deb20bd6743fbb3a5519192cef67442f7fc6..c9972f217d3f105b40f14e70dcb968a4b5240da8 100755 (executable)
 
 set -e
 
+CC="clang -std=c99"
+CFLAGS="-pedantic -Wall -Wextra -g -O2"
+
 make clean;  make tis-ci
 make clean;  make test
-make clean;  make test CFLAGS="-DBLAKE2_NO_UNROLLING -O3"
-make clean;  make test CC="clang -std=c99" CFLAGS="-g -fsanitize=address"
-make clean;  make test CC="clang -std=c99" CFLAGS="-g -fsanitize=memory"
-make clean;  make test CC="clang -std=c99" CFLAGS="-g -fsanitize=undefined"
-make clean;  make test.out CFLAGS="-g";  valgrind ./test.out
+make clean;  make test CFLAGS="$CFLAGS -DBLAKE2_NO_UNROLLING"
+make clean;  make test CFLAGS="$CFLAGS -fsanitize=address"
+make clean;  make test CFLAGS="$CFLAGS -fsanitize=memory"
+make clean;  make test CFLAGS="$CFLAGS -fsanitize=undefined"
+make clean;  make test.out CC="gcc -std=c99";  valgrind ./test.out
 
 echo
 echo "All sanitisers passed!"