]> granicus.if.org Git - re2c/commitdiff
- Autodetect valgrind for tests
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 5 Mar 2008 00:06:54 +0000 (00:06 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Wed, 5 Mar 2008 00:06:54 +0000 (00:06 +0000)
re2c/run_tests.sh.in

index 542833820e1056f8a79e2b47c8dfa2e236c5e24b..0fea9d58f8d7c472e6018a851e67f0e0e9f40d7e 100644 (file)
@@ -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})."