From: helly Date: Wed, 5 Mar 2008 00:06:54 +0000 (+0000) Subject: - Autodetect valgrind for tests X-Git-Tag: 0.13.6~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa9db2da55699a8b0a46b851b50399f657ded485;p=re2c - Autodetect valgrind for tests --- diff --git a/re2c/run_tests.sh.in b/re2c/run_tests.sh.in index 54283382..0fea9d58 100644 --- a/re2c/run_tests.sh.in +++ b/re2c/run_tests.sh.in @@ -8,7 +8,12 @@ diff -u $0 $0 >/dev/null 2>&1 && diff='diff -u' || diff='diff' if uname|grep -q -i 'CYGWIN' && test -x "@WINBUILDDIR@/re2c.exe"; then re2c='@WINBUILDDIR@/re2c.exe' else -re2c='@builddir@/re2c' +valgrind=`which valgrind` +if test -n "${valgrind}"; then + valgrind="${valgrind} -q " + echo "Using valgrind" +fi +re2c="${valgrind}@builddir@/re2c" fi if test ! -x "${re2c}"; then echo "Cannot find re2c executable (${re2c})."