mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 00:04:29 +08:00
build: Add support for running make check with valgrind
This check if valgrind tool is available adding it to be run with make check.
This commit is contained in:
parent
7f3eda34b5
commit
a21b661c7a
@ -428,6 +428,12 @@ if DBUS_RUN_SESSION
|
||||
AM_TESTS_ENVIRONMENT += dbus-run-session --
|
||||
endif
|
||||
|
||||
if VALGRIND
|
||||
LOG_COMPILER = valgrind --error-exitcode=1 --num-callers=30
|
||||
LOG_FLAGS = --trace-children=yes --leak-check=full --show-reachable=no \
|
||||
--suppressions=$(srcdir)/valgrind.supp --quiet
|
||||
endif
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
if LIBRARY
|
||||
|
@ -35,9 +35,12 @@ AC_PROG_LIBTOOL
|
||||
if (test "$USE_MAINTAINER_MODE" = "yes"); then
|
||||
AC_CHECK_PROG(enable_coverage, [lcov], [yes], [no])
|
||||
AC_CHECK_PROG(enable_dbus_run_session, [dbus-run-session], [yes])
|
||||
AC_CHECK_PROG(enable_valgrind, [valgrind], [yes])
|
||||
AC_CHECK_HEADERS(valgrind/memcheck.h)
|
||||
fi
|
||||
AM_CONDITIONAL(COVERAGE, test "${enable_coverage}" = "yes")
|
||||
AM_CONDITIONAL(DBUS_RUN_SESSION, test "${enable_dbus_run_session}" = "yes")
|
||||
AM_CONDITIONAL(VALGRIND, test "${enable_valgrind}" = "yes")
|
||||
|
||||
MISC_FLAGS
|
||||
|
||||
|
14
valgrind.supp
Normal file
14
valgrind.supp
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
ecb_bind
|
||||
Memcheck:Param
|
||||
socketcall.bind(my_addr.sa_data)
|
||||
fun:bind
|
||||
fun:ecb_aes_setup
|
||||
}
|
||||
{
|
||||
cmac_bind
|
||||
Memcheck:Param
|
||||
socketcall.bind(my_addr.sa_data)
|
||||
fun:bind
|
||||
fun:cmac_aes_setup
|
||||
}
|
Loading…
Reference in New Issue
Block a user