diff -r 7c4ba7daaf5f -r 2b6bffe0e7e8 scripts/valgrind-wrapper.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/valgrind-wrapper.sh Tue Dec 20 18:15:14 2011 +0100 @@ -0,0 +1,22 @@ +#!/bin/sh + +# Run in valgrind, with leak checking enabled + +valgrind -q --leak-check=full "$@" 2> .valgrind-log + +# Save the test result + +result="$?" + +# Valgrind should generate no error messages + +log_contents="`cat .valgrind-log`" + +if [ "$log_contents" != "" ]; then + cat .valgrind-log >&2 + result=1 +fi + +rm -f .valgrind-log + +exit $result