]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test040-subtree-rename
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / tests / scripts / test040-subtree-rename
index f212a5c03d452a14af906b8f1727109dc1909ec0..580493a00138f60e145c7030b0d60967e2ed6d35 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-2013 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
 
-case $BACKEND in
-hdb)
-       ;;
-*)
+if test $BACKEND = bdb ; then
        echo "subtree rename not supported by back-$BACKEND"
        exit 0
-esac
+fi
 
 mkdir -p $TESTDIR $DBDIR1
 
@@ -36,6 +33,8 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$PID"
 
+sleep 1
+
 echo "Testing slapd searching..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
@@ -192,9 +191,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
 LDIF=$SUBTREERENAMEOUT
 
 echo "Filtering ldapsearch results..."
-$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."
-$LDIFFILTER < $LDIF > $LDIFFLT
+$LDIFFILTER < $LDIF > $LDIFFLT
 echo "Comparing filter output..."
 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
 
@@ -204,4 +203,7 @@ if test $? != 0 ; then
 fi
 
 echo ">>>>> Test succeeded"
+
+test $KILLSERVERS != no && wait
+
 exit 0