From 211820b853797b52a662c1a58526b81af4a9a20b Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 21 Apr 2005 10:30:54 +0000 Subject: [PATCH] cleanup --- tests/scripts/test036-meta-concurrency | 29 +++++++++++++++++++------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/tests/scripts/test036-meta-concurrency b/tests/scripts/test036-meta-concurrency index d430732638..e1350e4bf0 100755 --- a/tests/scripts/test036-meta-concurrency +++ b/tests/scripts/test036-meta-concurrency @@ -23,25 +23,35 @@ if test $BACKMETA = metano ; then exit 0 fi +# to be removed some time... if test "x$TEST_META" != "xyes" ; then echo "### this test is currently disabled;" echo "### set \"TEST_META=yes\" to enable (at own risk)." + echo "" exit 0 else echo "### this test is __very__ experimental; enable at own risk" + echo "" fi rm -rf $TESTDIR mkdir -p $TESTDIR $DBDIR1 $DBDIR2 -if test "x$DB_CONFIG" != "x" -a -f $DB_CONFIG ; then - echo "==> using DB_CONFIG $DB_CONFIG" - cp $DB_CONFIG $DBDIR1 - cp $DB_CONFIG $DBDIR2 -else - echo "==> set \"DB_CONFIG\" to the location of the DB_CONFIG file" - echo "==> you want to use for the test." +# NOTE: this could be added to all tests... +if test "$BACKEND" = "bdb" -o "$BACKEND" = "hdb" ; then + if test "x$DB_CONFIG" != "x" ; then \ + if test -f $DB_CONFIG ; then + echo "==> using DB_CONFIG \"$DB_CONFIG\"" + cp $DB_CONFIG $DBDIR1 + cp $DB_CONFIG $DBDIR2 + else + echo "==> DB_CONFIG must point to a valid file (ignored)" + fi + else + echo "==> set \"DB_CONFIG\" to the DB_CONFIG file you want to use for the test." + fi + echo "" fi echo "Starting slapd on TCP/IP port $PORT1..." @@ -126,12 +136,15 @@ for f in $DATADIR/do_* ; do sed -e "s;$BASEDN;$METABASEDN;" $f > $TESTDIR/$f done +# add a read that matches only the local database, but selects +# also the remote as candidate; this should be removed to compare +# execution times with test008... for f in $TESTDIR/$DATADIR/do_read.* ; do echo "ou=Meta,$METABASEDN" >> $f done echo "Using tester for concurrent server access..." -$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR/$DATADIR" -h $LOCALHOST -p $PORT2 -D "cn=Manager,$METABASEDN" -w $PASSWD -l 100 -r 20 +$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR/$DATADIR" -h $LOCALHOST -p $PORT2 -D "cn=Manager,$METABASEDN" -w $PASSWD -l 50 # -r 20 RC=$? if test $RC != 0 ; then -- 2.39.5