]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test029-ldapglue
Note ITS#6780
[openldap] / tests / scripts / test029-ldapglue
index 4701e1897e055e8a66a836b3a36171600c38ebb9..7c0d2785ff29041e4ad9e2a8d0191432e1fd0a6d 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2005 The OpenLDAP Foundation.
+## Copyright 1998-2011 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -97,6 +97,8 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$PID1 $PID2 $PID3"
 
+sleep 1
+
 echo "Using ldapsearch to check that slapd is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
@@ -147,9 +149,9 @@ if test $RC != 0 ; then
 fi
 
 echo "Filtering ldapsearch results..."
-. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."
-. $LDIFFILTER < $LDAPGLUEOUT > $LDIFFLT
+$LDIFFILTER -s ldif=e < $LDAPGLUEOUT > $LDIFFLT
 echo "Comparing filter output..."
 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
        
@@ -172,9 +174,9 @@ if test $RC != 0 ; then
 fi
 
 echo "Filtering ldapsearch results..."
-$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."
-$LDIFFILTER < $LDAPGLUEANONYMOUSOUT > $LDIFFLT
+$LDIFFILTER < $LDAPGLUEANONYMOUSOUT > $LDIFFLT
 echo "Comparing filter output..."
 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
        
@@ -200,9 +202,9 @@ if test $USE_SASL != "no" ; then
        fi
 
        echo "Filtering ldapsearch results..."
-       $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+       $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
        echo "Filtering original ldif used to create database..."
-       $LDIFFILTER < $LDAPGLUEOUT > $LDIFFLT
+       $LDIFFILTER < $LDAPGLUEOUT > $LDIFFLT
        echo "Comparing filter output..."
        $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
        
@@ -216,5 +218,7 @@ fi
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo ">>>>> Test succeeded"
-exit 0
 
+test $KILLSERVERS != no && wait
+
+exit 0