]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test030-relay
Add missing 'kill -HUP $KILLPIDS' statement before an exit.
[openldap] / tests / scripts / test030-relay
index 5f732ec1af8f93a32dbdc750a8dfa85ddfc6536b..4d8f50438dd197ec323a4f9d92e982441ea198b5 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2004 The OpenLDAP Foundation.
+## Copyright 1998-2005 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
 
-if test $BACKRELAY = relayno ; then 
-       echo "relay backend not available, test skipped"
+if test $RWM = rwmno ; then 
+       echo "rwm (Rewrite/remap) overlay not available, test skipped"
        exit 0
 fi 
 
-RELAY=relay
-. $SRCDIR/scripts/relay
+echo ""
+
+if test "x$RELAYS" = "x" ; then
+       RELAYS=
+       # back-relay
+       if test $BACKRELAY = relayno ; then 
+               echo "relay backend not available, test skipped"
+       else
+               if test "x$RELAYS" != "x" ; then
+                       RELAYS="${RELAYS} "
+               fi
+               RELAYS="${RELAYS}relay"
+       fi
+
+       # back-ldap
+       if test $BACKLDAP = ldapno ; then 
+               echo "ldap backend not available, test skipped"
+       else
+               if test "x$RELAYS" != "x" ; then
+                       RELAYS="${RELAYS} "
+               fi
+               RELAYS="${RELAYS}ldap"
+       fi
+
+       # back-meta
+       if test $BACKMETA = metano ; then 
+               echo "meta backend not available, test skipped"
+       else
+               if test "x$RELAYS" != "x" ; then
+                       RELAYS="${RELAYS} "
+               fi
+               RELAYS="${RELAYS}meta"
+       fi 
+fi
+
+if test "x$RELAYS" = "x" ; then
+       echo "no relaying capable backend is available"
+       echo ">>>>> Test succeeded"
+       exit 0
+fi
+
+echo "Testing virtual naming context mapping with $RELAYS backend(s)..."
+echo ""
+
+first=1
+for RELAY in $RELAYS ; do
+       if test $first = 1 ; then
+               first=0
+       else
+               echo ">>>>> waiting 10 seconds for things to exit"
+               sleep 10
+               echo ""
+
+               rm -rf $TESTDIR
+       fi
+
+       mkdir -p $TESTDIR $DBDIR1
+
+       . $SRCDIR/scripts/relay
+done
+
+echo ">>>>> Test succeeded"
+exit 0