[rhmessaging-commits] rhmessaging commits: r3365 - in store/trunk/cpp/tests: cluster and 2 other directories.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu May 7 15:02:42 EDT 2009


Author: kpvdr
Date: 2009-05-07 15:02:42 -0400 (Thu, 07 May 2009)
New Revision: 3365

Modified:
   store/trunk/cpp/tests/Makefile.am
   store/trunk/cpp/tests/OrderingTest.cpp
   store/trunk/cpp/tests/SimpleTest.cpp
   store/trunk/cpp/tests/TransactionalTest.cpp
   store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
   store/trunk/cpp/tests/clean.sh
   store/trunk/cpp/tests/cluster/Makefile.am
   store/trunk/cpp/tests/jrnl/Makefile.am
   store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
   store/trunk/cpp/tests/jrnl/_ut_jdir.cpp
   store/trunk/cpp/tests/jrnl/jtt/Makefile.am
   store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp
   store/trunk/cpp/tests/jrnl/run-journal-tests
   store/trunk/cpp/tests/run_python_tests
   store/trunk/cpp/tests/system_test.sh
Log:
Changed environment var TMPDIR to TMP_STORE_DIR to avoid sg/newgrp problems. Added "sg ais" to python tests so clustering can be tested.

Modified: store/trunk/cpp/tests/Makefile.am
===================================================================
--- store/trunk/cpp/tests/Makefile.am	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/Makefile.am	2009-05-07 19:02:42 UTC (rev 3365)
@@ -26,7 +26,7 @@
 
 INCLUDES=-I$(top_srcdir)/lib -I$(top_srcdir)/lib/gen
 
-TMPDIR=$(abs_srcdir)/test_tmp
+TMP_STORE_DIR=$(abs_srcdir)/test_tmp
 
 SUBDIRS = jrnl cluster .
 
@@ -81,5 +81,5 @@
   VALGRIND=$(VALGRIND) \
   abs_srcdir=$(abs_srcdir) \
   LIBSTORE=$(abs_builddir)/../lib/.libs/msgstore.so \
-  TMPDIR=$(TMPDIR) \
+  TMP_STORE_DIR=$(TMP_STORE_DIR) \
   $(srcdir)/run_test

Modified: store/trunk/cpp/tests/OrderingTest.cpp
===================================================================
--- store/trunk/cpp/tests/OrderingTest.cpp	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/OrderingTest.cpp	2009-05-07 19:02:42 UTC (rev 3365)
@@ -44,7 +44,7 @@
 QPID_AUTO_TEST_SUITE(OrderingTest)
 
 const std::string test_filename("OrderingTest");
-const char* tdp = getenv("TMPDIR");
+const char* tdp = getenv("TMP_STORE_DIR");
 const std::string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/OrderingTest");
 
 // === Helper fns ===

Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/SimpleTest.cpp	2009-05-07 19:02:42 UTC (rev 3365)
@@ -51,7 +51,7 @@
 QPID_AUTO_TEST_SUITE(SimpleTest)
 
 const string test_filename("SimpleTest");
-const char* tdp = getenv("TMPDIR");
+const char* tdp = getenv("TMP_STORE_DIR");
 const string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/SimpleTest");
 
 // === Helper fns ===

Modified: store/trunk/cpp/tests/TransactionalTest.cpp
===================================================================
--- store/trunk/cpp/tests/TransactionalTest.cpp	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/TransactionalTest.cpp	2009-05-07 19:02:42 UTC (rev 3365)
@@ -46,7 +46,7 @@
 QPID_AUTO_TEST_SUITE(TransactionalTest)
 
 const string test_filename("TransactionalTest");
-const char* tdp = getenv("TMPDIR");
+const char* tdp = getenv("TMP_STORE_DIR");
 const string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/TransactionalTest");
 
 // Test txn context which has special setCompleteFailure() method which prevents entire "txn complete" process from hapenning

Modified: store/trunk/cpp/tests/TwoPhaseCommitTest.cpp
===================================================================
--- store/trunk/cpp/tests/TwoPhaseCommitTest.cpp	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/TwoPhaseCommitTest.cpp	2009-05-07 19:02:42 UTC (rev 3365)
@@ -47,7 +47,7 @@
 QPID_AUTO_TEST_SUITE(TwoPhaseCommitTest)
 
 const string test_filename("TwoPhaseCommitTest");
-const char* tdp = getenv("TMPDIR");
+const char* tdp = getenv("TMP_STORE_DIR");
 string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/TwoPhaseCommitTest");
 
 // === Helper fns ===

Modified: store/trunk/cpp/tests/clean.sh
===================================================================
--- store/trunk/cpp/tests/clean.sh	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/clean.sh	2009-05-07 19:02:42 UTC (rev 3365)
@@ -26,7 +26,7 @@
 # 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.
 
-if [ -d ${TMPDIR} ]; then
-    rm -rf ${TMPDIR}
+if [ -d ${TMP_STORE_DIR} ]; then
+    rm -rf ${TMP_STORE_DIR}
 fi
 rm -f ${abs_srcdir}/*.vglog*

Modified: store/trunk/cpp/tests/cluster/Makefile.am
===================================================================
--- store/trunk/cpp/tests/cluster/Makefile.am	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/cluster/Makefile.am	2009-05-07 19:02:42 UTC (rev 3365)
@@ -30,7 +30,7 @@
 
 INCLUDES=-I$(top_srcdir)/lib $(QPID_CXXFLAGS)
 
-TMPDIR=$(abs_srcdir)/test_tmp
+TMP_STORE_DIR=$(abs_srcdir)/test_tmp
 
 QPID_TEST_DIR = $(QPID_DIR)/cpp/src/tests
 
@@ -48,7 +48,7 @@
   QPID_DIR=$(QPID_DIR) \
   VALGRIND=$(VALGRIND) \
   LIBSTORE=$(abs_builddir)/../../lib/.libs/msgstore.so \
-  TMPDIR=$(TMPDIR) \
+  TMP_STORE_DIR=$(TMP_STORE_DIR) \
   abs_srcdir=$(abs_srcdir)
 
 EXTRA_DIST = \

Modified: store/trunk/cpp/tests/jrnl/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/Makefile.am	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/jrnl/Makefile.am	2009-05-07 19:02:42 UTC (rev 3365)
@@ -26,13 +26,13 @@
 
 INCLUDES=-I$(top_srcdir)/lib
 
-TMPDIR=$(abs_srcdir)/test_tmp
+TMP_STORE_DIR=$(abs_srcdir)/test_tmp
 
 SUBDIRS = jtt .
 
 TESTS_ENVIRONMENT = \
   VALGRIND=$(VALGRIND) \
-  TMPDIR=$(TMPDIR) \
+  TMP_STORE_DIR=$(TMP_STORE_DIR) \
   $(srcdir)/../run_test
 
 all-local: .valgrindrc .valgrind.supp

Modified: store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp	2009-05-07 19:02:42 UTC (rev 3365)
@@ -44,7 +44,7 @@
 #define NUM_JFILES 4
 #define JFSIZE_SBLKS 128
 
-const char* tdp = getenv("TMPDIR");
+const char* tdp = getenv("TMP_STORE_DIR");
 const string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/jrnl_test");
 
 class test_dtok : public data_tok

Modified: store/trunk/cpp/tests/jrnl/_ut_jdir.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_ut_jdir.cpp	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/jrnl/_ut_jdir.cpp	2009-05-07 19:02:42 UTC (rev 3365)
@@ -49,7 +49,7 @@
 QPID_AUTO_TEST_SUITE(jdir_suite)
 
 const string test_filename("_ut_jdir");
-const char* tdp = getenv("TMPDIR");
+const char* tdp = getenv("TMP_STORE_DIR");
 const string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/_ut_jdir");
 
 // === Helper functions ===

Modified: store/trunk/cpp/tests/jrnl/jtt/Makefile.am
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/Makefile.am	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/jrnl/jtt/Makefile.am	2009-05-07 19:02:42 UTC (rev 3365)
@@ -24,14 +24,14 @@
 
 AM_CXXFLAGS = $(WARNING_CFLAGS) -I${top_srcdir}/lib -pthread -DBOOST_TEST_DYN_LINK
 
-TMPDIR=$(abs_srcdir)/test_tmp
+TMP_STORE_DIR=$(abs_srcdir)/test_tmp
 
 LINK_BDB = ${top_builddir}/lib/msgstore.la
 
 TESTS_ENVIRONMENT = \
   VALGRIND=$(VALGRIND) \
   abs_srcdir=$(abs_srcdir) \
-  TMPDIR=$(TMPDIR) \
+  TMP_STORE_DIR=$(TMP_STORE_DIR) \
   $(srcdir)/../../run_test
 
 all-local: .valgrindrc .valgrind.supp

Modified: store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/jrnl/jtt/_ut_jrnl_instance.cpp	2009-05-07 19:02:42 UTC (rev 3365)
@@ -37,7 +37,7 @@
 QPID_AUTO_TEST_SUITE(jtt_jrnl_instance)
 
 const string test_filename("_ut_jrnl_instance");
-const char* tdp = getenv("TMPDIR");
+const char* tdp = getenv("TMP_STORE_DIR");
 const string test_dir(tdp && strlen(tdp) > 0 ? tdp : "/tmp/JttTest");
 
 QPID_AUTO_TEST_CASE(constructor_1)

Modified: store/trunk/cpp/tests/jrnl/run-journal-tests
===================================================================
--- store/trunk/cpp/tests/jrnl/run-journal-tests	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/jrnl/run-journal-tests	2009-05-07 19:02:42 UTC (rev 3365)
@@ -27,20 +27,20 @@
 # Run jtt using default test set
 echo
 echo "===== Mode 1: New journal instance, no recover ====="
-jtt/jtt --ja-path jtt --jrnl-dir ${TMPDIR} --csv jtt/jtt.csv --format-chk --num-jrnls ${num_jrnls} || fail=1
-rm -rf ${TMPDIR}/test_0*
+jtt/jtt --ja-path jtt --jrnl-dir ${TMP_STORE_DIR} --csv jtt/jtt.csv --format-chk --num-jrnls ${num_jrnls} || fail=1
+rm -rf ${TMP_STORE_DIR}/test_0*
 echo
 echo "===== Mode 2: Re-use journal instance, no recover ====="
-jtt/jtt --ja-path jtt --jrnl-dir ${TMPDIR} --csv jtt/jtt.csv --reuse-instance --format-chk --num-jrnls ${num_jrnls} || fail=1
-rm -rf ${TMPDIR}/test_0*
+jtt/jtt --ja-path jtt --jrnl-dir ${TMP_STORE_DIR} --csv jtt/jtt.csv --reuse-instance --format-chk --num-jrnls ${num_jrnls} || fail=1
+rm -rf ${TMP_STORE_DIR}/test_0*
 echo
 echo "===== Mode 3: New journal instance, recover previous test journal ====="
-jtt/jtt --ja-path jtt --jrnl-dir ${TMPDIR} --csv jtt/jtt.csv --recover-mode --format-chk --num-jrnls ${num_jrnls} || fail=1
-rm -rf ${TMPDIR}/test_0*
+jtt/jtt --ja-path jtt --jrnl-dir ${TMP_STORE_DIR} --csv jtt/jtt.csv --recover-mode --format-chk --num-jrnls ${num_jrnls} || fail=1
+rm -rf ${TMP_STORE_DIR}/test_0*
 echo
 echo "===== Mode 4: Re-use journal instance, recover previous test journal ====="
-jtt/jtt --ja-path jtt --jrnl-dir ${TMPDIR} --csv jtt/jtt.csv --reuse-instance --recover-mode --format-chk --num-jrnls ${num_jrnls} || fail=1
-rm -rf ${TMPDIR}/test_0*
+jtt/jtt --ja-path jtt --jrnl-dir ${TMP_STORE_DIR} --csv jtt/jtt.csv --reuse-instance --recover-mode --format-chk --num-jrnls ${num_jrnls} || fail=1
+rm -rf ${TMP_STORE_DIR}/test_0*
 echo
 
 exit $fail

Modified: store/trunk/cpp/tests/run_python_tests
===================================================================
--- store/trunk/cpp/tests/run_python_tests	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/run_python_tests	2009-05-07 19:02:42 UTC (rev 3365)
@@ -39,15 +39,15 @@
     exit
 fi
 
-BROKER_OPTS="--no-module-dir --load-module=${LIBSTORE} --data-dir=${TMPDIR} --auth=no"
+BROKER_OPTS="--no-module-dir --load-module=${LIBSTORE} --data-dir=${TMP_STORE_DIR} --auth=no"
 AMQP_SPEC=0-10-errata
 
 #Make sure temp dir exists if this is the first to use it
-if ! test -d ${TMPDIR} ; then
-    mkdir -p ${TMPDIR}
-   	mkdir -p ${TMPDIR}/cluster
-elif ! test -d "${TMPDIR}/cluster" ; then
-    mkdir -p "${TMPDIR}/cluster"
+if ! test -d ${TMP_STORE_DIR} ; then
+    mkdir -p ${TMP_STORE_DIR}
+   	mkdir -p ${TMP_STORE_DIR}/cluster
+elif ! test -d "${TMP_STORE_DIR}/cluster" ; then
+    mkdir -p "${TMP_STORE_DIR}/cluster"
 fi
 
 # Check AIS requirements
@@ -84,7 +84,7 @@
 # Run all python tests
 pwdir=$(pwd)
 cd ${QPID_PYTHON_DIR}
-./run-tests --skip-self-test -v -s ${AMQP_SPEC} -I ${FAILING_PYTHON_TESTS} -B "${BROKER_OPTS}" ${PYTHON_TESTS} || { echo "FAIL python tests for ${AMQP_SPEC}"; fail=1; }
+sg ais -c "./run-tests --skip-self-test -v -s ${AMQP_SPEC} -I ${FAILING_PYTHON_TESTS} -B \"${BROKER_OPTS}\" ${PYTHON_TESTS}" || { echo "FAIL python tests for ${AMQP_SPEC}"; fail=1; }
 cd ${pwdir}
 
 exit ${fail}

Modified: store/trunk/cpp/tests/system_test.sh
===================================================================
--- store/trunk/cpp/tests/system_test.sh	2009-05-07 11:00:44 UTC (rev 3364)
+++ store/trunk/cpp/tests/system_test.sh	2009-05-07 19:02:42 UTC (rev 3365)
@@ -35,17 +35,17 @@
 export PYTHONPATH=$QPID_DIR/python
 
 # Create a temporary directory for store data.
-#if test $TESTDIRx == x ; then
-#    export TMPDIR=`mktemp -d` || error "Can't create temporary directory."
+#if test $TMP_STORE_DIRx == x ; then
+#    export TMP_STORE_DIR=`mktemp -d` || error "Can't create temporary directory."
 #else
-#    export TMPDIR=$TESTDIR
+#    export TMP_STORE_DIR=$TESTDIR
 #fi
-echo "Using directory $TMPDIR"
+echo "Using directory $TMP_STORE_DIR"
 
 fail=0
 
 # Run the tests with a given set of flags
-BROKER_OPTS="--no-module-dir --load-module=$LIBSTORE --data-dir=$TMPDIR --auth=no --wcache-page-size 16"
+BROKER_OPTS="--no-module-dir --load-module=$LIBSTORE --data-dir=$TMP_STORE_DIR --auth=no --wcache-page-size 16"
 run_tests() {
     for p in `seq 1 8`; do
 	$abs_srcdir/start_broker "$@" ${BROKER_OPTS} || { echo "FAIL broker start";  return 1; }




More information about the rhmessaging-commits mailing list