aboutsummaryrefslogtreecommitdiffstats
path: root/build-aux/valgrind.sh
blob: bdf7e70da6676333607c52c14d4a6e928b795b8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

export TESTS_ENVIRONMENT="
	${VALGRIND:-valgrind} \
		--tool=memcheck \
		--leak-check=full \
		--show-leak-kinds=all \
		--leak-resolution=high \
		--num-callers=20 \
		--error-exitcode=1 \
		--show-possibly-lost=no"

if [[ "${1}" == *.sh ]]; then
	exec "${@}"
else
	exec ${TESTS_ENVIRONMENT} "${@}"
fi