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/README-dev | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'qpid/cpp/README-dev') diff --git a/qpid/cpp/README-dev b/qpid/cpp/README-dev index 577eca452b..108e1f4b1f 100644 --- a/qpid/cpp/README-dev +++ b/qpid/cpp/README-dev @@ -6,7 +6,7 @@ sudo cp /usr/share/aclocal/pkg.m4 `aclocal --print-ac-dir` == Prerequisites == If you have taken the sources from SVN you will need the following -packages (or later) +packages (or later) We prefer to avoid spending time accommodating older versions of these packages, so please make sure that you have the latest stable version. @@ -15,7 +15,7 @@ packages, so please make sure that you have the latest stable version. * GNU make * autoconf * automake - * cppunit + * cppunit * help2man * libtool * pkgconfig (aka pkg-config) @@ -105,14 +105,31 @@ for the most common development tasks will be scripted and/or simplified and this README will be updated accordingly. Before building a fresh checkout do: - ./bootstrap - ./configure + + ./bootstrap + ./configure This generates config, makefiles and the like - check the script for details. You only need to do this once, "make" will keep everything up to date thereafter (including re-generating configuration & Makefiles if the automake templates change etc.) +If you are developing code yourself, or if you want to help +us keep the code as tight and robust as possible, consider enabling +the use of valgrind. If you configure like this: + + ./configure --enable-valgrind + +that will arrange (assuming you have valgrind installed) for "make check" +to run tests via valgrind. That makes the tests run more slowly, but +helps detect certain types of bugs, as well as memory leaks. If you run +"make check" and valgrind detects a leak that is not listed as being +"ignorable-for-now", the test script in question will fail. However, +recording whether a leak is ignorable is not easy, when the stack +signature, libraries, compiler, O/S, architecture, etc., may all vary, +so if you see a new leak, try to figure out if it's one you can fix +before adding it to the list. + To build and test everything: make make check -- cgit v1.2.1