Skip to content

Commit

Permalink
Change travis.sh to check if variables are equal to yes instead of
Browse files Browse the repository at this point in the history
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
  • Loading branch information
elichai committed Jul 30, 2020
1 parent 6034a04 commit f6acf71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contrib/travis.sh
Expand Up @@ -23,7 +23,7 @@ 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)
Expand All @@ -32,7 +32,7 @@ then
fi
if [ -n "$BENCH" ]
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'
Expand All @@ -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

0 comments on commit f6acf71

Please sign in to comment.