]> git.sur5r.net Git - openldap/blob - tests/scripts/test030-relay
add new glued ldap concurrency test
[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-2005 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 "rwm (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                 if test "x$RELAYS" != "x" ; then
33                         RELAYS="${RELAYS} "
34                 fi
35                 RELAYS="${RELAYS}relay"
36         fi
37
38         # back-ldap
39         if test $BACKLDAP = ldapno ; then 
40                 echo "ldap backend not available, test skipped"
41         else
42                 if test "x$RELAYS" != "x" ; then
43                         RELAYS="${RELAYS} "
44                 fi
45                 RELAYS="${RELAYS}ldap"
46         fi
47
48         # back-meta
49         if test $BACKMETA = metano ; then 
50                 echo "meta backend not available, test skipped"
51         else
52                 if test "x$RELAYS" != "x" ; then
53                         RELAYS="${RELAYS} "
54                 fi
55                 RELAYS="${RELAYS}meta"
56         fi 
57 fi
58
59 if test "x$RELAYS" = "x" ; then
60         echo "no relaying capable backend is available"
61         echo ">>>>> Test succeeded"
62         exit 0
63 fi
64
65 echo "Testing virtual naming context mapping with $RELAYS backend(s)..."
66 echo ""
67
68 first=1
69 for RELAY in $RELAYS ; do
70         if test $first = 1 ; then
71                 first=0
72         else
73                 echo ">>>>> waiting 10 seconds for things to exit"
74                 sleep 10
75                 echo ""
76
77                 rm -rf $TESTDIR
78         fi
79
80         mkdir -p $TESTDIR $DBDIR1
81
82         . $SRCDIR/scripts/relay
83 done
84
85 echo ">>>>> Test succeeded"
86 exit 0
87