Change travis.sh to check if variables are equal to yes instead of

not-empty.
Before this, setting `VALGRIND=wat` was considered as true, and to make it
evaluate as false you had to unset the variable `VALGRIND=` but not it
checks if `VALGRIND=yes` and if it's not `yes` then it's evaluated to
false
This commit is contained in:
Elichai Turkel 2020-07-30 11:18:07 +03:00
parent 6034a04fb1
commit ef37761fee
No known key found for this signature in database
GPG Key ID: 9383CDE9E8E66A7F
1 changed files with 4 additions and 4 deletions

View File

@ -23,16 +23,16 @@ if [ -n "$BUILD" ]
then
make -j2 "$BUILD"
fi
if [ -n "$VALGRIND" ]
if [ "$VALGRIND" = "yes" ]
then
make -j2
# the `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (http://valgrind.org/docs/manual/manual-core.html)
valgrind --error-exitcode=42 ./tests 16
valgrind --error-exitcode=42 ./exhaustive_tests
fi
if [ -n "$BENCH" ]
if [ "$BENCH" = "yes" ]
then
if [ -n "$VALGRIND" ]
if [ "$VALGRIND" = "yes" ]
then
# Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool
EXEC='./libtool --mode=execute valgrind --error-exitcode=42'
@ -56,7 +56,7 @@ then
$EXEC ./bench_ecdh >> bench.log 2>&1
fi
fi
if [ -n "$CTIMETEST" ]
if [ "$CTIMETEST" = "yes" ]
then
./libtool --mode=execute valgrind --error-exitcode=42 ./valgrind_ctime_test > valgrind_ctime_test.log 2>&1
fi