summaryrefslogtreecommitdiff
path: root/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
commit4a8d2bdc6a029fd176abbc2ecb505ffe100f92fd (patch)
tree53a495a2f5d6315c6c35ffcdae389c174fefd569 /cpp/src/tests/run_cluster_tests
parent30eec8fc1f8ba0b256b4a5e3cb4c16c3f2d7fbff (diff)
downloadqpid-python-4a8d2bdc6a029fd176abbc2ecb505ffe100f92fd.tar.gz
Updates to python cluster tests and associated scripts
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@783451 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/run_cluster_tests')
-rwxr-xr-xcpp/src/tests/run_cluster_tests18
1 files changed, 16 insertions, 2 deletions
diff --git a/cpp/src/tests/run_cluster_tests b/cpp/src/tests/run_cluster_tests
index 103896cd3d..bfe6ef855e 100755
--- a/cpp/src/tests/run_cluster_tests
+++ b/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