Skip to content

Commit ef37761

Browse files
committed
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
1 parent 6034a04 commit ef37761

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/travis.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ if [ -n "$BUILD" ]
2323
then
2424
make -j2 "$BUILD"
2525
fi
26-
if [ -n "$VALGRIND" ]
26+
if [ "$VALGRIND" = "yes" ]
2727
then
2828
make -j2
2929
# 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)
3030
valgrind --error-exitcode=42 ./tests 16
3131
valgrind --error-exitcode=42 ./exhaustive_tests
3232
fi
33-
if [ -n "$BENCH" ]
33+
if [ "$BENCH" = "yes" ]
3434
then
35-
if [ -n "$VALGRIND" ]
35+
if [ "$VALGRIND" = "yes" ]
3636
then
3737
# Using the local `libtool` because on macOS the system's libtool has nothing to do with GNU libtool
3838
EXEC='./libtool --mode=execute valgrind --error-exitcode=42'
@@ -56,7 +56,7 @@ then
5656
$EXEC ./bench_ecdh >> bench.log 2>&1
5757
fi
5858
fi
59-
if [ -n "$CTIMETEST" ]
59+
if [ "$CTIMETEST" = "yes" ]
6060
then
6161
./libtool --mode=execute valgrind --error-exitcode=42 ./valgrind_ctime_test > valgrind_ctime_test.log 2>&1
6262
fi

0 commit comments

Comments
 (0)