summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDafydd Harries <dafydd.harries@collabora.co.uk>2007-02-13 15:07:00 +0000
committerDafydd Harries <dafydd.harries@collabora.co.uk>2007-02-13 15:07:00 +0000
commit54f621930965360e165b2d47f0c4699ebbe68d8b (patch)
tree37cf3b15bebd8b5338f102f85d19dcf84f310c95 /scripts
parent708857c39d565395975c6826c8ab2aa4bf745415 (diff)
downloadlibnice-54f621930965360e165b2d47f0c4699ebbe68d8b.tar.gz
valgrind.sh: fail if memory was definitely leaked
darcs-hash:20070213150736-c9803-2332896e51ee0d04d0e0814b568da5e68ea15af8.gz
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/valgrind.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/valgrind.sh b/scripts/valgrind.sh
index c5b1dbd..1e25875 100755
--- a/scripts/valgrind.sh
+++ b/scripts/valgrind.sh
@@ -4,7 +4,6 @@ export G_SLICE=always-malloc
export G_DEBUG=gc-friendly
report=`libtool --mode=execute valgrind \
- -q \
--leak-check=full \
--show-reachable=no \
--error-exitcode=1 \
@@ -15,3 +14,11 @@ if test $? != 0; then
echo "$report"
exit 1
fi
+
+if echo "$report" | grep -q "definitely lost"; then
+ if ! echo "$report" | grep -q "definitely lost: 0 bytes"; then
+ echo "$report"
+ exit 1
+ fi
+fi
+