You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2007/03/13 22:55:03 UTC
svn commit: r517892 - in /incubator/qpid/branches/qpid.0-9: ./
cpp/README-dev cpp/configure.ac cpp/docs/api/Makefile.am
cpp/qpid-autotools-install cpp/tests/.vg-supp cpp/tests/Makefile.am
cpp/tests/run-unit-tests cpp/tests/setup
Author: aconway
Date: Tue Mar 13 14:55:02 2007
New Revision: 517892
URL: http://svn.apache.org/viewvc?view=rev&rev=517892
Log:
Merged revisions 499049 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid
........
r499049 | gsim | 2007-01-23 10:12:27 -0500 (Tue, 23 Jan 2007) | 34 lines
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
........
Added:
incubator/qpid/branches/qpid.0-9/cpp/tests/.vg-supp
- copied unchanged from r499049, incubator/qpid/trunk/qpid/cpp/tests/.vg-supp
incubator/qpid/branches/qpid.0-9/cpp/tests/setup
- copied unchanged from r499049, incubator/qpid/trunk/qpid/cpp/tests/setup
Modified:
incubator/qpid/branches/qpid.0-9/ (props changed)
incubator/qpid/branches/qpid.0-9/cpp/README-dev
incubator/qpid/branches/qpid.0-9/cpp/configure.ac
incubator/qpid/branches/qpid.0-9/cpp/docs/api/Makefile.am
incubator/qpid/branches/qpid.0-9/cpp/qpid-autotools-install
incubator/qpid/branches/qpid.0-9/cpp/tests/Makefile.am
incubator/qpid/branches/qpid.0-9/cpp/tests/run-unit-tests
Propchange: incubator/qpid/branches/qpid.0-9/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Mar 13 14:55:02 2007
@@ -1 +1 @@
-/incubator/qpid/trunk/qpid:1-492620,492636,492641,492756,493126-493151,494540,494553,494587,495629,495661,496317,496665,496678,497341,497439,498591
+/incubator/qpid/trunk/qpid:1-492620,492636,492641,492756,493126-493151,494540,494553,494587,495629,495661,496317,496665,496678,497341,497439,498591,499049
Modified: incubator/qpid/branches/qpid.0-9/cpp/README-dev
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/README-dev?view=diff&rev=517892&r1=517891&r2=517892
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/README-dev (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/README-dev Tue Mar 13 14:55:02 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/branches/qpid.0-9/cpp/configure.ac
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/configure.ac?view=diff&rev=517892&r1=517891&r2=517892
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/configure.ac (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/configure.ac Tue Mar 13 14:55:02 2007
@@ -120,6 +120,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/branches/qpid.0-9/cpp/docs/api/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/docs/api/Makefile.am?view=diff&rev=517892&r1=517891&r2=517892
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/docs/api/Makefile.am (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/docs/api/Makefile.am Tue Mar 13 14:55:02 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/branches/qpid.0-9/cpp/qpid-autotools-install
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/qpid-autotools-install?view=diff&rev=517892&r1=517891&r2=517892
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/qpid-autotools-install (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/qpid-autotools-install Tue Mar 13 14:55:02 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
Modified: incubator/qpid/branches/qpid.0-9/cpp/tests/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/tests/Makefile.am?view=diff&rev=517892&r1=517891&r2=517892
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/tests/Makefile.am (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/tests/Makefile.am Tue Mar 13 14:55:02 2007
@@ -10,6 +10,11 @@
$(APR_CXXFLAGS)
# Unit tests
+client_tests = \
+ client_test \
+ echo_service \
+ topic_listener \
+ topic_publisher
broker_tests = \
AccumulatedAckTest \
@@ -64,16 +69,26 @@
noinst_PROGRAMS = $(client_exe_tests)
+TESTS_ENVIRONMENT = \
+ VALGRIND=$(VALGRIND) \
+ abs_builddir='$(abs_builddir)' \
+ PATH="$(abs_builddir)/../src$(PATH_SEPARATOR)$$PATH" \
+ abs_srcdir='$(abs_srcdir)'
+
CLIENT_TESTS = client_test quick_topictest
TESTS = run-unit-tests start_broker $(CLIENT_TESTS) python_tests kill_broker
EXTRA_DIST = \
$(TESTS) \
- topictest \
- qpid_test_plugin.h \
- MockConnectionInputHandler.h \
+ .vg-supp \
+ InProcessBroker.h \
MockChannel.h \
- InProcessBroker.h
+ MockConnectionInputHandler.h \
+ qpid_test_plugin.h \
+ setup \
+ topicall \
+ topictest \
+ APRBaseTest.cpp
include gen.mk
Modified: incubator/qpid/branches/qpid.0-9/cpp/tests/run-unit-tests
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/cpp/tests/run-unit-tests?view=diff&rev=517892&r1=517891&r2=517892
==============================================================================
--- incubator/qpid/branches/qpid.0-9/cpp/tests/run-unit-tests (original)
+++ incubator/qpid/branches/qpid.0-9/cpp/tests/run-unit-tests Tue Mar 13 14:55:02 2007
@@ -1,3 +1,9 @@
#!/bin/sh
-DllPlugInTester -c -b .libs/*.so
+. $srcdir/setup
+
+fail=0
+$vg DllPlugInTester -c -b $pwd/.libs/*.so 2> out || fail=1
+vg_check out || fail=1
+
+exit $fail