add enable-valgrind

This commit is contained in:
toddouska
2012-12-04 21:28:18 -08:00
parent 9005d2b54b
commit 067f10ae8e
5 changed files with 58 additions and 3 deletions

22
valgrind-error.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
#
#
# Our valgrind "error" wrapper.
valgrind --leak-check=full -q "$@" 2> valgrind.tmp
result="$?"
# verify no errors
output="`cat valgrind.tmp`"
if [ "$output" != "" ]; then
cat valgrind.tmp >&2
result=1
fi
rm valgrind.tmp
exit $result