]> git.sur5r.net Git - openldap/blob - tests/scripts/test030-relay
allow to select what relays to use
[openldap] / tests / scripts / test030-relay
1 #! /bin/sh
2 # $OpenLDAP$
3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ##
5 ## Copyright 1998-2004 The OpenLDAP Foundation.
6 ## All rights reserved.
7 ##
8 ## Redistribution and use in source and binary forms, with or without
9 ## modification, are permitted only as authorized by the OpenLDAP
10 ## Public License.
11 ##
12 ## A copy of this license is available in the file LICENSE in the
13 ## top-level directory of the distribution or, alternatively, at
14 ## <http://www.OpenLDAP.org/license.html>.
15
16 echo "running defines.sh"
17 . $SRCDIR/scripts/defines.sh
18
19 if test $RWM = rwmno ; then 
20         echo "Rewrite/remap overlay not available, test skipped"
21         exit 0
22 fi 
23
24 echo ""
25
26 if test "x$RELAYS" = "x" ; then
27         RELAYS=
28         # back-relay
29         if test $BACKRELAY = relayno ; then 
30                 echo "relay backend not available, test skipped"
31         else
32                 RELAYS="${RELAYS}relay "
33         fi
34
35         # back-ldap
36         if test $BACKLDAP = ldapno ; then 
37                 echo "ldap backend not available, test skipped"
38         else
39                 RELAYS="${RELAYS}ldap "
40         fi
41
42         # back-meta
43         if test $BACKMETA = metano ; then 
44                 echo "meta backend not available, test skipped"
45         else
46                 RELAYS="${RELAYS}meta "
47         fi 
48 fi
49
50 echo "Using $RELAYS..."
51 echo ""
52
53 first=1
54 for RELAY in $RELAYS ; do
55         if test $first = 1 ; then
56                 first=0
57         else
58                 echo ">>>>> waiting 10 seconds for things to exit"
59                 sleep 10
60                 echo ""
61
62                 rm -rf $TESTDIR
63         fi
64
65         mkdir -p $TESTDIR $DBDIR1
66
67         . $SRCDIR/scripts/relay
68 done
69
70 echo ">>>>> Test succeeded"
71 exit 0
72