From e9014260de233fc56863e45d445a4d28d59e8fe7 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Tue, 23 Jan 2007 15:12:27 +0000 Subject: Patch from Jim Meyering (jim@meyering.net) submitted on dev list. Instrument all tests so that they are run via valgrind: check for both errors and leaks. * configure.ac: Add new configure options: --enable-valgrind and --disable-valgrind. For now, the latter is the default. * README-dev: Document (and recommend) --enable-valgrind. * tests/.vg-supp: Add many more, from Gordon Sim for FC5. * configure.ac: Check for valgrind. * tests/Makefile.am (TESTS_ENVIRONMENT): Export VALGRIND. * tests/setup: New file. * tests/run-unit-tests: Use new "setup" file. Invoke DllPlugInTester via $vg (aka valgrind). Refer to the source directory using $pwd, since we're now running from a temporary subdirectory. * tests/run-python-tests: Remove traps. That is now done by "setup". [VERBOSE]: Print qpidd --version. Invoke qpidd via $vg and its absolute name. Add a kludgey "sleep 3", because it can take a while for libtool to start valgrind to start qpidd, in the background. Ideally, the python script would simply sleep-0.3-and-retry for a couple seconds, upon failure of the initial connection attempt. * tests/.vg-supp: New file, exempting known leaks on Debian/unstable. Some of these leaks appear to be legitimate. * tests/Makefile.am (EXTRA_DIST): Add .vg-supp and setup. * qpid-autotools-install (usage): Add a missing backslash. Fix "make distcheck" failure. * docs/api/Makefile.am (EXTRA_DIST): Add user.doxygen git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@499049 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/configure.ac | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'qpid/cpp/configure.ac') diff --git a/qpid/cpp/configure.ac b/qpid/cpp/configure.ac index 058bce148f..a590f9b5e1 100644 --- a/qpid/cpp/configure.ac +++ b/qpid/cpp/configure.ac @@ -119,6 +119,22 @@ if test "$enable_APR" = yes; then USE_APR=1 fi +AC_ARG_ENABLE(valgrind, + [ --enable-valgrind enable testing via valgrind, if available (recommended) + --disable-valgrind do not use valgrind], + [case $enableval in + yes|no) enable_VALGRIND=$enableval;; + *) AC_MSG_ERROR([invalid valgrind enable/disable value: $enableval]);; + esac], + [enable_VALGRIND=no] # no option given, default + ) + +# We use valgrind for the tests. See if it's available. +# Check for it unconditionally, so we don't have to duplicate its +# use of AC_SUBST([VALGRIND]). +AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind]) +test "$enable_VALGRIND" = no && VALGRIND= + AC_CONFIG_FILES([ Makefile gen/Makefile -- cgit v1.2.1