tests: Exit valgrind tests if a leak is detected

This fails the test if OT_TESTS_VALGRIND is set and valgrind
detects a leak.

Closes: #334
Approved by: cgwalters
This commit is contained in:
Alexander Larsson 2016-06-10 13:28:08 +02:00 committed by Atomic Bot
parent f6b70a32e6
commit d258b124a2
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ if test -n "${OT_TESTS_DEBUG:-}"; then
fi fi
if test -n "${OT_TESTS_VALGRIND:-}"; then if test -n "${OT_TESTS_VALGRIND:-}"; then
CMD_PREFIX="env G_SLICE=always-malloc OSTREE_SUPPRESS_SYNCFS=1 valgrind -q --leak-check=full --num-callers=30 --suppressions=${test_srcdir}/glib.supp --suppressions=${test_srcdir}/ostree.supp" CMD_PREFIX="env G_SLICE=always-malloc OSTREE_SUPPRESS_SYNCFS=1 valgrind -q --error-exitcode=1 --leak-check=full --num-callers=30 --suppressions=${test_srcdir}/glib.supp --suppressions=${test_srcdir}/ostree.supp"
else else
CMD_PREFIX="env LD_PRELOAD=${test_builddir}/libreaddir-rand.so" CMD_PREFIX="env LD_PRELOAD=${test_builddir}/libreaddir-rand.so"
fi fi