Code

unit tests: Run all tests through Valgrind's memcheck, if available.
authorSebastian Harl <sh@tokkee.org>
Sat, 4 Jun 2016 16:27:52 +0000 (18:27 +0200)
committerSebastian Harl <sh@tokkee.org>
Sat, 4 Jun 2016 16:31:26 +0000 (18:31 +0200)
configure.ac
src/Makefile.am
src/daemon/Makefile.am

index 99d665ded42cd870b40dc0856275b977c8ac6ec4..beb30c282edce273d409af71a2044d12b58ec016 100644 (file)
@@ -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])
 
index 66792961e021e9326744ab7178d0c605e8398ca5..67c25335e108708c4964fd25a00ed856ed5fc031 100644 (file)
@@ -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  " $@;
index d59e82348404da03594d91e6aa20bc3a95cd5962..632872a2a901d56f36872dc840bef4204c452c37 100644 (file)
@@ -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