summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/run_cluster_tests
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2009-06-10 18:54:30 +0000
committerKim van der Riet <kpvdr@apache.org>2009-06-10 18:54:30 +0000
commited4b7b25c1c0b8c9a533af8685216bcf8090bcb9 (patch)
treeeb69c2782d98f34e17fdf24c24af018a0cade379 /qpid/cpp/src/tests/run_cluster_tests
parent3a9ab627b39b4fe2ab515e27dc162d12d0744777 (diff)
downloadqpid-python-ed4b7b25c1c0b8c9a533af8685216bcf8090bcb9.tar.gz
Updates to python cluster tests and associated scripts
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@783451 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/run_cluster_tests')
-rwxr-xr-xqpid/cpp/src/tests/run_cluster_tests18
1 files changed, 16 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/run_cluster_tests b/qpid/cpp/src/tests/run_cluster_tests
index 103896cd3d..bfe6ef855e 100755
--- a/qpid/cpp/src/tests/run_cluster_tests
+++ b/qpid/cpp/src/tests/run_cluster_tests
@@ -19,6 +19,15 @@
# under the License.
#
+
+# 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`
+ top_builddir=${srcdir}/../../
+fi
+
+
# Run the cluster tests.
TEST_DIR=${top_builddir}/src/tests
@@ -64,8 +73,8 @@ if ! test -d ${TMP_STORE_DIR} ; then
mkdir -p ${TMP_STORE_DIR}/cluster
else
# Delete old cluster test dirs
- rm -rf "${TMP_STORE_DIR}/cluster"
- mkdir -p "${TMP_STORE_DIR}/cluster"
+ rm -rf ${TMP_STORE_DIR}/cluster
+ mkdir -p ${TMP_STORE_DIR}/cluster
fi
export TMP_STORE_DIR
@@ -75,3 +84,8 @@ RETCODE=$?
if test x${RETCODE} != x0; then
exit 1;
fi
+
+# Delete cluster store dir if test was successful.
+rm -rf ${TMP_STORE_DIR}
+
+exit 0 \ No newline at end of file