From fe62f80100e439dcf0ce95d906c762aa267c0f03 Mon Sep 17 00:00:00 2001 From: Kim van der Riet Date: Wed, 12 Aug 2009 16:56:24 +0000 Subject: Moved python cluster tests to new python test runner git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@803599 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/run_cluster_tests | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'qpid/cpp/src/tests/run_cluster_tests') diff --git a/qpid/cpp/src/tests/run_cluster_tests b/qpid/cpp/src/tests/run_cluster_tests index d86e3db134..8b039346db 100755 --- a/qpid/cpp/src/tests/run_cluster_tests +++ b/qpid/cpp/src/tests/run_cluster_tests @@ -19,13 +19,6 @@ # under the License. # -if test -z $1; then - CLUSTER_TEST=cluster_tests.py -else - CLUSTER_TEST=$1 - echo "Running ${CLUSTER_TEST}..." -fi - # Check that top_builddir and srcdir are set # If not, assume local run from test dir if [ -z ${top_builddir} -o -z ${srcdir} ]; then @@ -33,22 +26,34 @@ if [ -z ${top_builddir} -o -z ${srcdir} ]; then top_builddir=${srcdir}/../../ fi TEST_DIR=${top_builddir}/src/tests +PYTHON_DIR=${srcdir}/../../../python + +if test -z $1; then + CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests cluster_tests.ShortTests.\*" +else + CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests cluster_tests.LongTests.\*" + echo "Running $1..." +fi # Check AIS requirements id -nG | grep '\' > /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" +ps -u root | grep 'aisexec\|corosync' > /dev/null || NOAISEXEC="The aisexec or corosync daemon is not running as root." +if ! test -d ${PYTHON_DIR}; then + NO_PYTHON_DIR="PYTHON_DIR=\"${PYTHON_DIR}\" not found or does not exist." +fi -if test -n "${NOGROUP}" -o -n "${NOAISEXEC}"; then +if test -n "${NOGROUP}" -o -n "${NOAISEXEC}" -o -n "${NO_PYTHON_DIR}"; then cat <