[rhmessaging-commits] rhmessaging commits: r3355 - in store/trunk/cpp/tests: cluster and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Tue May 5 15:07:47 EDT 2009


Author: kpvdr
Date: 2009-05-05 15:07:47 -0400 (Tue, 05 May 2009)
New Revision: 3355

Added:
   store/trunk/cpp/tests/cluster/
   store/trunk/cpp/tests/cluster/Makefile.am
   store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Added missing cluster test dir

Added: store/trunk/cpp/tests/cluster/Makefile.am
===================================================================
--- store/trunk/cpp/tests/cluster/Makefile.am	                        (rev 0)
+++ store/trunk/cpp/tests/cluster/Makefile.am	2009-05-05 19:07:47 UTC (rev 3355)
@@ -0,0 +1,57 @@
+# Copyright (c) 2007, 2008, 2009 Red Hat, Inc.
+#
+# This file is part of the Qpid async store library msgstore.so.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+# USA
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
+
+abs_builddir=@abs_builddir@
+abs_srcdir=@abs_srcdir@
+
+if HAVE_LIBCPG
+
+
+AM_CXXFLAGS = $(WARNING_CFLAGS) -pthread -DBOOST_TEST_DYN_LINK
+
+INCLUDES=-I$(top_srcdir)/lib $(QPID_CXXFLAGS)
+
+TMPDIR=$(abs_srcdir)/test_tmp
+
+QPID_TEST_DIR = $(QPID_DIR)/cpp/src/tests
+
+all-local: .valgrindrc .valgrind.supp
+.valgrindrc: $(top_srcdir)/tests/.valgrindrc
+	cp $^ .
+.valgrind.supp: $(top_srcdir)/tests/.valgrind.supp
+	cp $^ .
+
+TESTS = run_cluster_tests
+
+TESTS_ENVIRONMENT = \
+  BOOST_TEST_SHOW_PROGRESS=yes \
+  STORE_ENABLE=1 \
+  QPID_DIR=$(QPID_DIR) \
+  VALGRIND=$(VALGRIND) \
+  LIBSTORE=$(abs_builddir)/../../lib/.libs/msgstore.so \
+  TMPDIR=$(TMPDIR) \
+  abs_srcdir=$(abs_srcdir)
+
+EXTRA_DIST = \
+  run_cluster_tests
+
+endif
\ No newline at end of file

Added: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests	                        (rev 0)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests	2009-05-05 19:07:47 UTC (rev 3355)
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+# Copyright (c) 2008, 2009 Red Hat, Inc.
+#
+# This file is part of the Qpid async store library msgstore.so.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
+# USA
+#
+# The GNU Lesser General Public License is available in the file COPYING.
+
+srcdir=`dirname $0`
+
+# Check AIS requirements and run tests if found.
+id -nG | grep '\<ais\>' >/dev/null || \
+    NOGROUP="You are not a member of the ais group."
+ps -u root | grep 'aisexec\|corosync' >/dev/null || \
+    NOAISEXEC="The aisexec or corosync daemon is not running as root"
+
+if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
+    cat <<EOF
+
+    =========== WARNING: NOT RUNNING AIS TESTS ==============
+
+    Tests that depend on the openais library (used for clustering)
+    will not be run because:
+
+    $NOGROUP
+    $NOAISEXEC
+
+    ==========================================================
+    
+EOF
+    exit 0;			# A warning, not a failure.
+fi
+
+# Execute command with the ais group set.
+with_ais_group() {
+    id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group."; exit 1; }
+    echo $* | newgrp ais
+}
+
+CLUSTER_EXEC=cluster_test
+if test -d ${QPID_DIR}; then
+	CLUSTER_DIR=${QPID_DIR}/cpp/src/tests
+else
+	CLUSTER_PATH=`which ${CLUSTER_EXEC}`
+	if test -z ${CLUSTER_PATH} ; then
+		echo "No executable \"${CLUSTER_EXEC}\" found in path"
+		exit 1
+	else
+		CLUSTER_DIR=${CLUSTER_PATH%/*}
+	fi
+fi
+
+# Run the tests
+srcdir=`dirname $0`
+cd ${CLUSTER_DIR}
+pwd
+with_ais_group ./${CLUSTER_EXEC} || ERROR=1
+exit $ERROR


Property changes on: store/trunk/cpp/tests/cluster/run_cluster_tests
___________________________________________________________________
Name: svn:executable
   + *




More information about the rhmessaging-commits mailing list