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

set -e

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

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