summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-02-08 19:28:55 +0100
committerThomas Haller <thaller@redhat.com>2015-02-09 12:10:13 +0100
commitcfa45600733a91b774d436d66d0e6a446a18834c (patch)
tree125e830e4adb77a2d14a08a46077e8815dc727b1
parente7356ef0a6fa94b20850d6f8ca73bfac17589510 (diff)
downloadNetworkManager-th/memleaks.tar.gz
tests: fail valgrind script if log file is non-emptyth/memleaks
-rwxr-xr-xtools/run-test-valgrind.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/run-test-valgrind.sh b/tools/run-test-valgrind.sh
index 7eac4a80b7..fb8cb1482e 100755
--- a/tools/run-test-valgrind.sh
+++ b/tools/run-test-valgrind.sh
@@ -27,6 +27,11 @@ $LIBTOOL --mode=execute "$VALGRIND" \
"$TEST"
RESULT=$?
+if [ $RESULT -eq 0 -a "$(wc -c "$LOGFILE" | awk '{print$1}')" -ne 0 ]; then
+ echo "valgrind succeeded, but log is not empty: $LOGFILE"
+ exit 1
+fi
+
if [ $RESULT -ne 0 -a $RESULT -ne 77 ]; then
echo "Don't forget to check the valgrind log at '`realpath $LOGFILE`'." >&2
fi