Actually add the testwrapper.sh script.
[collectd.git] / testwrapper.sh
1 #! /bin/bash
2 #
3 # collectd -- testwrapper.sh
4 #
5 # A wrapper script for running tests. If valgrind is available, memory
6 # checking will be enabled for all tests.
7
8 set -e
9
10 MEMCHECK=""
11
12 if test -n "$VALGRIND"; then
13         MEMCHECK="$VALGRIND --quiet --tool=memcheck --error-exitcode=1"
14         MEMCHECK="$MEMCHECK --trace-children=yes"
15         MEMCHECK="$MEMCHECK --leak-check=full"
16         MEMCHECK="$MEMCHECK --gen-suppressions=all"
17 fi
18
19 exec $MEMCHECK "$@"
20
21 # vim: set tw=78 sw=4 ts=4 noexpandtab :
22