]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test008-concurrency
Revert 1.11, the extra clause breaks test009-referral for back-bdb.
[openldap] / tests / scripts / test008-concurrency
index 8110d37e6182aca0bb04d37da531f4e1b18c2e36..24f1722901293a40804a40ad1bab9bf8c2b2c867 100755 (executable)
@@ -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"