X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest008-concurrency;h=24f1722901293a40804a40ad1bab9bf8c2b2c867;hb=b45fb4f5c5ac9bf5e331934017f5e19abee61eee;hp=8110d37e6182aca0bb04d37da531f4e1b18c2e36;hpb=daacf23672ce3cf0d98f8c18e0fa2f017746c213;p=openldap diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency index 8110d37e61..24f1722901 100755 --- a/tests/scripts/test008-concurrency +++ b/tests/scripts/test008-concurrency @@ -1,17 +1,20 @@ #! /bin/sh # $OpenLDAP$ -if test $# -eq 0 ; then - SRCDIR="." -else +SRCDIR="." +if test $# -ge 1 ; then SRCDIR=$1; shift fi -if test $# -eq 1 ; then +BACKEND=ldbm +if test $# -ge 1 ; then BACKEND=$1; shift fi +WAIT=0 +if test $# -ge 1 ; then + WAIT=1; shift +fi -echo "running defines.sh $SRCDIR $BACKEND" - +echo "running defines.sh" . $SRCDIR/scripts/defines.sh echo "Datadir is $DATADIR" @@ -21,7 +24,8 @@ echo "Cleaning up in $DBDIR..." rm -f $DBDIR/[!C]* echo "Running slapadd to build slapd database..." -$LDIF2LDBM -f $CONF -l $LDIF +. $CONFFILTER $BACKEND < $CONF > $DBCONF +$SLAPADD -f $DBCONF -l $LDIFORDERED RC=$? if test $RC != 0 ; then echo "slapadd failed ($RC)!" @@ -32,8 +36,12 @@ echo "Waiting 5 seconds for slapadd to build slapd database..." sleep 5 echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 & +$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! +if test $WAIT != 0 ; then + echo PID $PID + read foo +fi echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do @@ -68,11 +76,11 @@ if test $RC != 0 ; then fi echo "Filtering ldapsearch results..." -. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT +. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT echo "Filtering original ldif used to create database..." -. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT +. $LDIFFILTER < $LDIF > $LDIFFLT echo "Comparing filter output..." -$CMP $SEARCHFLT $LDIFFLT +$CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - database was not created correctly"