summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ace8eb9)
raw | patch | inline | side by side (parent: ace8eb9)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 4 Jun 2016 16:39:21 +0000 (18:39 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 4 Jun 2016 16:39:21 +0000 (18:39 +0200) |
… it's now used for running all tests.
testwrapper.sh | [new file with mode: 0755] | patch | blob |
diff --git a/testwrapper.sh b/testwrapper.sh
--- /dev/null
+++ b/testwrapper.sh
@@ -0,0 +1,22 @@
+#! /bin/bash
+#
+# collectd -- testwrapper.sh
+#
+# A wrapper script for running tests. If valgrind is available, memory
+# checking will be enabled for all tests.
+
+set -e
+
+MEMCHECK=""
+
+if test -n "$VALGRIND"; then
+ MEMCHECK="$VALGRIND --quiet --tool=memcheck --error-exitcode=1"
+ MEMCHECK="$MEMCHECK --trace-children=yes"
+ MEMCHECK="$MEMCHECK --leak-check=full"
+ MEMCHECK="$MEMCHECK --gen-suppressions=all"
+fi
+
+exec $MEMCHECK "$@"
+
+# vim: set tw=78 sw=4 ts=4 noexpandtab :
+