From: Sebastian Harl Date: Sat, 4 Jun 2016 16:27:52 +0000 (+0200) Subject: unit tests: Run all tests through Valgrind's memcheck, if available. X-Git-Tag: collectd-5.6.0~243^2~2 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=f4366504b9fef13f15f53b029c90e810cbc44e2d;hp=183223fd3c46819703437f9989f0fa12491aa4d0 unit tests: Run all tests through Valgrind's memcheck, if available. --- diff --git a/configure.ac b/configure.ac index 99d665de..beb30c28 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,9 @@ AC_PROG_LIBTOOL AC_PROG_LEX AC_PROG_YACC +AC_PATH_PROG([VALGRIND], [valgrind]) +AC_SUBST([VALGRIND]) + # Warn when pkg.m4 is missing m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) diff --git a/src/Makefile.am b/src/Makefile.am index 66792961..67c25335 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,6 +17,8 @@ endif AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdir}"' AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"' +LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_top_srcdir)/testwrapper.sh + V_PROTOC = $(v_protoc_@AM_V@) v_protoc_ = $(v_protoc_@AM_DEFAULT_V@) v_protoc_0 = @echo " PROTOC " $@; diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index d59e8234..632872a2 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -87,6 +87,8 @@ else collectd_LDADD += -loconfig endif +LOG_COMPILER = env VALGRIND="@VALGRIND@" $(abs_top_srcdir)/testwrapper.sh + check_PROGRAMS = test_common test_meta_data test_utils_avltree test_utils_heap test_utils_time test_utils_subst TESTS = test_common test_meta_data test_utils_avltree test_utils_heap test_utils_time test_utils_subst