Author: kpvdr
Date: 2008-03-06 16:35:41 -0500 (Thu, 06 Mar 2008)
New Revision: 1766
Added:
store/trunk/cpp/tests/clean.sh
Modified:
store/trunk/cpp/tests/Makefile.am
Log:
Additional clean script added to make sure no old data can hang the unit and system tests
Modified: store/trunk/cpp/tests/Makefile.am
===================================================================
--- store/trunk/cpp/tests/Makefile.am 2008-03-06 21:14:07 UTC (rev 1765)
+++ store/trunk/cpp/tests/Makefile.am 2008-03-06 21:35:41 UTC (rev 1766)
@@ -9,6 +9,7 @@
SUBDIRS = jrnl
TESTS = \
+ clean.sh \
SimpleTest \
OrderingTest \
TransactionalTest \
@@ -37,7 +38,7 @@
$@-t
mv $@-t $@
-EXTRA_DIST = system_test.sh persistence.py MessageUtils.h setup .vg-supp
+EXTRA_DIST = clean.sh system_test.sh persistence.py MessageUtils.h setup .vg-supp
TESTS_ENVIRONMENT = \
QPID_DIR=$(QPID_DIR) \
Added: store/trunk/cpp/tests/clean.sh
===================================================================
--- store/trunk/cpp/tests/clean.sh (rev 0)
+++ store/trunk/cpp/tests/clean.sh 2008-03-06 21:35:41 UTC (rev 1766)
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Copyright (C) 2008 Red Hat Software
+#
+# This file is part of Red Hat Messaging.
+#
+# Red Hat Messaging 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 file 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.
+
+# This scrip cleans up any previous database and journal files, and should
+# be run prior to the store system tests, as these are prone to crashing or
+# hanging under some circumstances if the database is old or inconsistent.
+
+WORKING_DIR=/tmp
+
+if [ -d ${WORKING_DIR}/rhm ]; then
+ rm -rf ${WORKING_DIR}/rhm/*
+fi