summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/cluster.mk
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-06-07 14:29:24 +0000
committerAlan Conway <aconway@apache.org>2007-06-07 14:29:24 +0000
commit2bc2c756906232e5182cdf0de96840661688297b (patch)
treed8c2d4d2464714c442fd70d9780a8eb967a39403 /qpid/cpp/src/tests/cluster.mk
parent3a00442a29d77282fe3fb4a810627deae319c796 (diff)
downloadqpid-python-2bc2c756906232e5182cdf0de96840661688297b.tar.gz
Build support for clustering, initial CPG wrapper & tests.
- src/qpid/cluster/Cpg.cpp: C++ wrapper for the openais CPG library. - src/tests/unit/Cpg.cpp: verify CPG functions in make check. - makefiles etc.: build cluster stuff only if openais is installed. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@545190 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/cluster.mk')
-rw-r--r--qpid/cpp/src/tests/cluster.mk23
1 files changed, 23 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/cluster.mk b/qpid/cpp/src/tests/cluster.mk
new file mode 100644
index 0000000000..489eec748e
--- /dev/null
+++ b/qpid/cpp/src/tests/cluster.mk
@@ -0,0 +1,23 @@
+#-*-Makefile-*-
+# 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.
+
+# 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)
+ chmod a+rwx . .libs
+ sudo -u ais $(MAKE) check TESTS=$(AIS_UNIT_TESTS)
+