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 | 2e15ee024a7f47bda7bd6ea5991657a820bd0714 (patch) | |
| tree | e40f85c648e557d68bc0436d1bbcb42a3712ceb0 /cpp/src/tests/cluster.mk | |
| parent | 3354535849812a62c00bc568ea9df51cf6153e0d (diff) | |
| download | qpid-python-2e15ee024a7f47bda7bd6ea5991657a820bd0714.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/qpid@550915 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster.mk')
| -rw-r--r-- | cpp/src/tests/cluster.mk | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/cpp/src/tests/cluster.mk b/cpp/src/tests/cluster.mk index fd8f789363..bf777c6255 100644 --- a/cpp/src/tests/cluster.mk +++ b/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 |
