summaryrefslogtreecommitdiff
path: root/cpp/src/tests/cluster.mk
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-06-26 02:11:55 +0000
committerAlan Conway <aconway@apache.org>2007-06-26 02:11:55 +0000
commite6566439f627e375f12f77044819bbb37b585348 (patch)
tree18c52172d536b53df57e82a274a31bcfabc35f7b /cpp/src/tests/cluster.mk
parent87c376ebc8fe6af86dc8aef8dcec03510ff5dcc0 (diff)
downloadqpid-python-e6566439f627e375f12f77044819bbb37b585348.tar.gz
2007-06-25 <aconway@redhat.com>
Cluster class implementing cluster membership map. * src/qpid/cluster/Cluster.cpp: Cluster membership implementation. * src/qpid/cluster/Cpg.cpp: Support for boost::function callbacks. * src/tests/Url.cpp: Implements AMQP-95 URL format. * xml/cluster.xml: Cluster join method. Build/packaging * README: Remove mention of openais till clustering is functional. For now it is optional and we depend on an unpackaged version. * configure.ac: Check openais has cpg_local_get(). * Makefile.am: Added cluster.xml to EXTRA_DIST. * src/generate.sh: add cluster.xml to codegen. * src/tests/Makefile.am: - Generate individual "sudo -u ais" wrappers for openais tests. - Drop "unit" directory, all unit tests in "tests" directory Minor changes: * src/qpid/sys/posix/Socket.cpp: * src/qpid/sys/posix/PosixAcceptor.cpp: * src/qpid/sys/posix/EventChannelAcceptor.cpp: * src/qpid/sys/apr/APRAcceptor.cpp: * src/qpid/sys/Acceptor.h (getHost): Added getHost() * src/tests/.valgrind.supp-default: Suppress benign valgrind warning in libcpg. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550658 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster.mk')
-rw-r--r--cpp/src/tests/cluster.mk38
1 files changed, 25 insertions, 13 deletions
diff --git a/cpp/src/tests/cluster.mk b/cpp/src/tests/cluster.mk
index 489eec748e..fd8f789363 100644
--- a/cpp/src/tests/cluster.mk
+++ b/cpp/src/tests/cluster.mk
@@ -1,23 +1,35 @@
-#-*-Makefile-*-
+if CLUSTER
# Cluster tests makefile fragment, to be included in Makefile.am
#
lib_cluster = $(abs_builddir)/../libqpidcluster.la
-#
-# AIS_UNIT_TESTS must be called with gid=ais. They are run
-# separately under sudo -u ais.
-#
-AIS_UNIT_TESTS=
-AIS_UNIT_TESTS+=Cpg
-Cpg_SOURCES=unit/Cpg.cpp
-Cpg_LDADD=-lboost_unit_test_framework $(lib_cluster)
-
-RUN_AIS_TESTS=ais_unit_tests # Run ais unit tests via check-ais.
+# 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.
+#
+# Rule to generate wrappers.
# The chmod is a horrible hack to allow libtools annoying wrapers to
# relink the executable when run as user ais.
-check-ais: $(AIS_UNIT_TESTS)
+.ais.sh:
+ echo sudo -u ais env VALGRIND=$(VALGRIND) srcdir=$(srcdir) $(srcdir)/run_test ./$< >$@; chmod a+x $@
chmod a+rwx . .libs
- sudo -u ais $(MAKE) check TESTS=$(AIS_UNIT_TESTS)
+# Cluster tests.
+#
+check_PROGRAMS+=Cpg.ais
+Cpg_ais_SOURCES=Cpg.cpp
+Cpg_ais_LDADD=$(lib_cluster) -lboost_unit_test_framework
+unit_wrappers+=Cpg.sh
+
+check_PROGRAMS+=Cluster.ais
+Cluster_ais_SOURCES=Cluster.cpp Cluster.h
+Cluster_ais_LDADD=$(lib_cluster) -lboost_unit_test_framework
+unit_wrappers+=Cluster.sh
+
+check_PROGRAMS+=Cluster_child
+Cluster_child_SOURCES=Cluster_child.cpp Cluster.h
+Cluster_child_LDADD=$(lib_cluster) -lboost_test_exec_monitor
+
+endif