diff options
author | Alan Conway <aconway@apache.org> | 2007-06-26 19:33:00 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-06-26 19:33:00 +0000 |
commit | a1ac3d0a8a8464663fc105a400829b1f163681b9 (patch) | |
tree | 390f905e72c9b316707633c842c0f8f25f76cb70 | |
parent | 09d3ec4489e0859fd9eac277f96631a21eb87267 (diff) | |
download | qpid-python-a1ac3d0a8a8464663fc105a400829b1f163681b9.tar.gz |
* src/tests/cluster.mk: Replace sudo with newgrp for ais tests.
Skip ais tests with warning if user is not in ais group.
* src/tests/Makefile.am: Enable valgrind for all tests.
* src/qpid/client/Connector.cpp: Fix memory leak.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@550915 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/client/Connector.cpp | 4 | ||||
-rw-r--r-- | qpid/cpp/src/tests/Makefile.am | 7 | ||||
-rw-r--r-- | qpid/cpp/src/tests/cluster.mk | 16 |
3 files changed, 14 insertions, 13 deletions
diff --git a/qpid/cpp/src/qpid/client/Connector.cpp b/qpid/cpp/src/qpid/client/Connector.cpp index 18cb0e064b..99f2d6ece1 100644 --- a/qpid/cpp/src/qpid/client/Connector.cpp +++ b/qpid/cpp/src/qpid/client/Connector.cpp @@ -46,7 +46,9 @@ Connector::Connector( outbuf(send_buffer_size) { } -Connector::~Connector(){ } +Connector::~Connector(){ + receiver.join(); +} void Connector::connect(const std::string& host, int port){ socket = Socket::createTcp(); diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am index 60290ee2da..9b15b68c04 100644 --- a/qpid/cpp/src/tests/Makefile.am +++ b/qpid/cpp/src/tests/Makefile.am @@ -89,12 +89,7 @@ testprogs = \ check_PROGRAMS += $(unit_progs) $(testprogs) interop_runner -# FIXME aconway 2007-05-30: TESTS_ENVIRONMENT should have ./run_test -# as below to run valgrind on all test programs. -# Disabled temporarily till leaks in client_test are fixed. -# -#TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) ./run_test -TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) +TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) ./run_test system_tests = client_test quick_topictest TESTS = dummy_test $(unit_progs) $(unit_wrappers) run-unit-tests start_broker $(system_tests) python_tests kill_broker daemon_test diff --git a/qpid/cpp/src/tests/cluster.mk b/qpid/cpp/src/tests/cluster.mk index fd8f789363..bf777c6255 100644 --- a/qpid/cpp/src/tests/cluster.mk +++ b/qpid/cpp/src/tests/cluster.mk @@ -6,16 +6,20 @@ lib_cluster = $(abs_builddir)/../libqpidcluster.la # NOTE: Programs using the openais library must be run with gid=ais # Such programs are built as *.ais, with a wrapper script *.sh that -# runs the program under sudo -u ais. +# runs the program with newgrp ais. # -# Rule to generate wrappers. -# The chmod is a horrible hack to allow libtools annoying wrapers to -# relink the executable when run as user ais. +# Rule to generate wrapper scripts for tests that require gid=ais. +run_test="env VALGRIND=$(VALGRIND) srcdir=$(srcdir) $(srcdir)/run_test" .ais.sh: - echo sudo -u ais env VALGRIND=$(VALGRIND) srcdir=$(srcdir) $(srcdir)/run_test ./$< >$@; chmod a+x $@ - chmod a+rwx . .libs + echo "if groups | grep '\bais\b' >/dev/null;" > $@_t + echo "then echo $(run_test) ./$< \"$$@ \"| newgrp ais;" >>$@_t + echo "else echo WARNING: `whoami` not in group ais, skipping $<.;" >>$@_t + echo "fi" >> $@_t + mv $@_t $@ + chmod a+x $@ +# # Cluster tests. # check_PROGRAMS+=Cpg.ais |