From baa3ab296da95708fde52780ced6de34a49d26e3 Mon Sep 17 00:00:00 2001 From: Ilya Lipnitskiy Date: Tue, 3 Dec 2013 10:26:51 -0800 Subject: [PATCH] .travis.yml: add a travis build entry to run tests under valgrind Makefile.am: add valgrind to the AM_TESTS_ENVIRONMENT configure.ac: enable valgrind testing option for ./configure m4/valgrind-tests.m4: enable tracing children for libtool wrapper script compatibility, but ignore standard binaries in /usr or /bin --- .travis.yml | 2 ++ Makefile.am | 2 ++ configure.ac | 2 ++ m4/valgrind-tests.m4 | 3 ++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82c6fdb..64efa85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,3 +9,5 @@ install: script: - ./autogen.sh - ./configure && make distcheck && make clean + - ./configure --enable-valgrind-tests && make distcheck + DISTCHECK_CONFIGURE_FLAGS="--enable-valgrind-tests" && make clean diff --git a/Makefile.am b/Makefile.am index d1077fd..dc415d8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -92,6 +92,8 @@ protoc_c_protoc_c_LDADD = \ # protobuf-c tests # +AM_TESTS_ENVIRONMENT = $(VALGRIND) + check_PROGRAMS += \ t/generated-code/test-generated-code \ t/generated-code2/test-generated-code2 diff --git a/configure.ac b/configure.ac index 6011308..f217056 100644 --- a/configure.ac +++ b/configure.ac @@ -41,6 +41,8 @@ else fi AM_CONDITIONAL([BUILD_COMPILER], [test "x$enable_protoc" != "xno"]) +gl_VALGRIND_TESTS + AC_C_BIGENDIAN AC_OUTPUT diff --git a/m4/valgrind-tests.m4 b/m4/valgrind-tests.m4 index 9fe0be2..cf2f8fc 100644 --- a/m4/valgrind-tests.m4 +++ b/m4/valgrind-tests.m4 @@ -23,7 +23,8 @@ AC_DEFUN([gl_VALGRIND_TESTS], if test -n "$VALGRIND" && $VALGRIND -q true > /dev/null 2>&1; then opt_valgrind_tests=yes - VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=full" + VALGRIND="$VALGRIND -q --error-exitcode=1 --leak-check=full \ + --trace-children=yes --trace-children-skip=/usr/*,/bin/*" else opt_valgrind_tests=no VALGRIND=