+ - # travis_wait extends the 10 minutes without output allowed (https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received)
+ - # 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)
+ - if [ -n "$VALGRIND" ]; then
+ make -j2 &&
+ travis_wait 30 valgrind --error-exitcode=42 ./tests 16 &&
+ travis_wait 30 valgrind --error-exitcode=42 ./exhaustive_tests;
+ fi