diff -r 58c330ad0b5c -r 6be1f9bd2ac0 scripts/valgrind-wrapper.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/valgrind-wrapper.sh Wed Dec 09 11:14:06 2009 +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