From ef4a319984d22b88a9024ff523700d657621124d Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 10 Jul 2012 13:44:21 +1000 Subject: Add the LEMON graph library source to the repo I'll likely be using it, so this just makes it easier to get to from elsewhere. If I end up not using it then I can just delete it. --- lemon/scripts/valgrind-wrapper.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 lemon/scripts/valgrind-wrapper.sh (limited to 'lemon/scripts/valgrind-wrapper.sh') diff --git a/lemon/scripts/valgrind-wrapper.sh b/lemon/scripts/valgrind-wrapper.sh new file mode 100755 index 0000000..bbb1222 --- /dev/null +++ b/lemon/scripts/valgrind-wrapper.sh @@ -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 -- cgit v1.2.3