diff options
Diffstat (limited to 'qpid/cpp/src/tests/run_cluster_tests')
-rwxr-xr-x | qpid/cpp/src/tests/run_cluster_tests | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/qpid/cpp/src/tests/run_cluster_tests b/qpid/cpp/src/tests/run_cluster_tests index c89e657243..d1a58f9f6a 100755 --- a/qpid/cpp/src/tests/run_cluster_tests +++ b/qpid/cpp/src/tests/run_cluster_tests @@ -22,11 +22,11 @@ # Check that top_builddir and srcdir are set # If not, assume local run from test dir if [ -z ${top_builddir} -o -z ${srcdir} ]; then - srcdir=`pwd` + srcdir=`dirname $0` top_builddir=${srcdir}/../../ fi TEST_DIR=${top_builddir}/src/tests -. `dirname $0`/python_env.sh +. $srcdir/python_env.sh if test -z $1; then CLUSTER_TEST="$PYTHON_COMMANDS/qpid-python-test -m cluster_tests cluster_tests.ShortTests.\*" @@ -35,32 +35,8 @@ else echo "Running $1..." fi - # Check AIS requirements -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 -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}" -o -n "${NO_PYTHON_DIR}"; then - cat <<EOF - - ======== WARNING: PYTHON CLUSTER TESTS DISABLED =========== - - Tests that depend on the openais library (used for clustering) - and python will not be run because: - - ${NOGROUP} - ${NOAISEXEC} - ${NO_PYTHON_DIR} - - =========================================================== - -EOF - exit 0 -fi - +. $srcdir/ais_check # Check XML exchange requirements XML_LIB=$srcdir/../.libs/xml.so @@ -103,7 +79,7 @@ export TMP_DATA_DIR # Run the test -sg ais -c "${CLUSTER_TEST}" +with_ais_group ${CLUSTER_TEST} RETCODE=$? if test x${RETCODE} != x0; then |