From 95dcf60c822e4ab92c0dd1a7ff6cba73bc55bcd1 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 4 Jun 2016 18:39:21 +0200 Subject: [PATCH] Actually add the testwrapper.sh script. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … it's now used for running all tests. --- testwrapper.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 testwrapper.sh diff --git a/testwrapper.sh b/testwrapper.sh new file mode 100755 index 00000000..bec33c06 --- /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 : + -- 2.30.2