]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test003-search
unifdef -DSLAPD_SCHEMA_NOT_COMPAT -USLAPD_SCHEMA_COMPAT
[openldap] / tests / scripts / test003-search
index 2999b01117c19fa301e88eb5735758ea9b2e7140..eb79e876d36c206bc67175a14257815e2d68ceeb 100755 (executable)
@@ -1,4 +1,5 @@
 #! /bin/sh
+# $OpenLDAP$
 
 if test $# -eq 0 ; then
        SRCDIR="."
@@ -16,16 +17,16 @@ echo "Cleaning up in $DBDIR..."
 
 rm -f $DBDIR/[!C]*
 
-echo "Running ldif2ldbm to build slapd database..."
-$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
+echo "Running slapadd to build slapd database..."
+$LDIF2LDBM -f $CONF -l $LDIF
 RC=$?
 if test $RC != 0 ; then
-       echo "ldif2ldbm failed!"
+       echo "slapadd failed!"
        exit $RC
 fi
 
 echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 &
+$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
 PID=$!
 
 echo "Testing slapd searching..."
@@ -58,7 +59,7 @@ fi
 
 echo "Testing OR searching..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
-       '(|(objectclass=rfc822mailgroup)(sn=jones))' >> $SEARCHOUT 2>&1
+       '(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1
 if test $RC != 0 ; then
        echo "ldapsearch failed!"
        kill -HUP $PID
@@ -67,7 +68,7 @@ fi
 
 echo "Testing AND matching and ends-with searching..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
-       '(&(objectclass=rfc822mailgroup)(cn=A*))' >> $SEARCHOUT 2>&1
+       '(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
 if test $RC != 0 ; then
        echo "ldapsearch failed!"
        kill -HUP $PID
@@ -92,7 +93,7 @@ echo "Filtering ldapsearch results..."
 echo "Filtering original ldif used to create database..."
 . $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
 echo "Comparing filter output..."
-cmp $SEARCHFLT $LDIFFLT
+$CMP $SEARCHFLT $LDIFFLT
 
 if test $? != 0 ; then
        echo "Comparison failed"