Author: gsim
Date: Tue Jan 23 07:12:27 2007
New Revision: 499049
URL: http://svn.apache.org/viewvc?view=rev&rev=499049
Log:
Patch from Jim Meyering ([EMAIL PROTECTED]) 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
Added:
incubator/qpid/trunk/qpid/cpp/tests/.vg-supp
incubator/qpid/trunk/qpid/cpp/tests/setup
Modified:
incubator/qpid/trunk/qpid/cpp/README-dev
incubator/qpid/trunk/qpid/cpp/configure.ac
incubator/qpid/trunk/qpid/cpp/docs/api/Makefile.am
incubator/qpid/trunk/qpid/cpp/qpid-autotools-install
incubator/qpid/trunk/qpid/cpp/tests/Makefile.am
incubator/qpid/trunk/qpid/cpp/tests/run-python-tests
incubator/qpid/trunk/qpid/cpp/tests/run-unit-tests
Modified: incubator/qpid/trunk/qpid/cpp/README-dev
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/README-dev?view=diff&rev=499049&r1=499048&r2=499049
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/README-dev (original)
+++ incubator/qpid/trunk/qpid/cpp/README-dev Tue Jan 23 07:12:27 2007
@@ -6,7 +6,7 @@
== 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 @@
* GNU make <http://www.gnu.org/software/make/>
* autoconf <http://www.gnu.org/software/autoconf/>
* automake <http://www.gnu.org/software/automake/>
- * cppunit <http://cppunit.sourceforge.net>
+ * cppunit <http://cppunit.sourceforge.net>
* help2man <http://www.gnu.org/software/help2man/>
* libtool <http://www.gnu.org/software/libtool/>
* pkgconfig <http://pkgconfig.freedesktop.org/wiki/> (aka pkg-config)
@@ -105,13 +105,30 @@
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
Modified: incubator/qpid/trunk/qpid/cpp/configure.ac
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/configure.ac?view=diff&rev=499049&r1=499048&r2=499049
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/configure.ac (original)
+++ incubator/qpid/trunk/qpid/cpp/configure.ac Tue Jan 23 07:12:27 2007
@@ -119,6 +119,22 @@
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
Modified: incubator/qpid/trunk/qpid/cpp/docs/api/Makefile.am
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/docs/api/Makefile.am?view=diff&rev=499049&r1=499048&r2=499049
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/docs/api/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/docs/api/Makefile.am Tue Jan 23 07:12:27 2007
@@ -1,22 +1,21 @@
-
html: doxygen.tstamp
dist-hook: html
-EXTRA_DIST=html
+EXTRA_DIST = \
+ html \
+ user.doxygen
SOURCES = \
$(wildcard $(top_srcdir)/gen/*.h) \
$(wildcard $(top_srcdir)/lib/common/*.h) \
$(wildcard $(top_srcdir)/lib/common/sys/*.h) \
$(wildcard $(top_srcdir)/lib/common/framing/*.h) \
- $(wildcard $(top_srcdir)/lib/client/*.h)
+ $(wildcard $(top_srcdir)/lib/client/*.h)
doxygen.tstamp: user.doxygen $(SOURCES)
- doxygen user.doxygen
+ doxygen $(srcdir)/user.doxygen
touch $@
clean-local:
rm -rf docs.tstamp html man latex doxygen.tstamp xml
-
-
Modified: incubator/qpid/trunk/qpid/cpp/qpid-autotools-install
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/qpid-autotools-install?view=diff&rev=499049&r1=499048&r2=499049
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/qpid-autotools-install (original)
+++ incubator/qpid/trunk/qpid/cpp/qpid-autotools-install Tue Jan 23 07:12:27
2007
@@ -1,7 +1,7 @@
#!/bin/sh
# Written by Jim Meyering
-VERSION='2006-12-18 16:16' # UTC
+VERSION='2007-01-22 19:38' # UTC
prog_name=`basename $0`
die () { echo "$prog_name: $*" >&2; exit 1; }
@@ -24,7 +24,7 @@
--skip-check do not run "make check" (this can save 50+ min)
--help display this help and exit
-For example, to install programs into $HOME/qpid-tools/bin, run this command:
+For example, to install programs into \$HOME/qpid-tools/bin, run this command:
$prog_name --prefix=\$HOME/qpid-tools