]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test002-populate
Extend TLS/SSL detection for use RSAref if necessary.
[openldap] / tests / scripts / test002-populate
index c04d1f5f651563490d48c84af5991a70b06ebccb..7852062ba11310a472d26064dc2977f0d8224822 100755 (executable)
@@ -1,14 +1,22 @@
 #!/bin/sh
 
-. scripts/defines.sh
+if [ $# -eq 0 ]; then
+       SRCDIR="."
+else
+       SRCDIR=$1; shift
+fi
+if [ $# -eq 1 ]; then
+       BDB2=$1; shift
+fi
 
+. $SRCDIR/scripts/defines.sh $SRCDIR $BDB2
 
 echo "Cleaning up in $DBDIR..."
 
-rm -f $DBDIR/*
+rm -f $DBDIR/[!C]*
 
 echo "Starting slapd on TCP/IP port $PORT..."
-$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
+$SLAPD -f $CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 &
 PID=$!
 
 echo "Using ldapsearch to check that slapd is running..."
@@ -44,8 +52,13 @@ if [ $RC != 0 ]; then
        exit $RC
 fi
 
-echo "Comparing retrieved entries to LDIF file used to create database"
-cmp $SEARCHOUT $LDIF
+echo "Filtering ldapsearch results..."
+. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
+echo "Filtering original ldif used to create database..."
+. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
+echo "Comparing filter output..."
+cmp $SEARCHFLT $LDIFFLT
+
 if [ $? != 0 ]; then
        echo "comparison failed - database was not created correctly"
        exit 1