Debian Codegraph @

tests/scripts/test030-relay

raw symbols SCIP
1 #! /bin/shscip-shell filesystem . . `/bin/sh`.
2 # $OpenLDAP$
3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ##
5 ## Copyright 1998-2024 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 echoscip-shell system . . echo. "running defines.sh"
17 . $SRCDIR/scripts/defines.sh
18
19 if testscip-shell system . . test. $RWM = rwmno ; then
20 echoscip-shell system . . echo. "rwm (Rewrite/remap) overlay not available, test skipped"
21 exit 0
22 fi
23
24 echoscip-shell system . . echo. ""
25
26 if testscip-shell system . . test. "x$RELAYS" = "x" ; then
27 RELAYS=
28 # back-relay
29 if testscip-shell system . . test. $BACKRELAY = relayno ; then
30 echoscip-shell system . . echo. "relay backend not available, test skipped"
31 else
32 if testscip-shell system . . test. "x$RELAYS" != "x" ; then
33 RELAYS="${RELAYS} "
34 fi
35 RELAYS="${RELAYS}relay"
36 fi
37
38 # back-ldap
39 if testscip-shell system . . test. $BACKLDAP = ldapno ; then
40 echoscip-shell system . . echo. "ldap backend not available, test skipped"
41 else
42 if testscip-shell system . . test. "x$RELAYS" != "x" ; then
43 RELAYS="${RELAYS} "
44 fi
45 RELAYS="${RELAYS}ldap"
46 fi
47
48 # back-meta
49 if testscip-shell system . . test. $BACKMETA = metano ; then
50 echoscip-shell system . . echo. "meta backend not available, test skipped"
51 else
52 if testscip-shell system . . test. "x$RELAYS" != "x" ; then
53 RELAYS="${RELAYS} "
54 fi
55 RELAYS="${RELAYS}meta"
56 fi
57 fi
58
59 if testscip-shell system . . test. "x$RELAYS" = "x" ; then
60 echoscip-shell system . . echo. "no relaying capable backend is available"
61 echoscip-shell system . . echo. ">>>>> Test succeeded"
62 exit 0
63 fi
64
65 echoscip-shell system . . echo. "Testing virtual naming context mapping with $RELAYS backend(s)..."
66 echoscip-shell system . . echo. ""
67
68 tmpfile=savelog.log
69 if testscip-shell system . . test. -f $tmpfile ; then
70 rmscip-shell system . . rm. -f $tmpfile
71 fi
72 first=1
73 for RELAY in $RELAYS ; do
74 if testscip-shell system . . test. $first = 1 ; then
75 first=0
76 else
77 echoscip-shell system . . echo. ">>>>> waiting for things to exit"
78 testscip-shell system . . test. $KILLSERVERS != no && wait
79 echoscip-shell system . . echo. ""
80
81 mvscip-shell system . . mv. -f $LOG1 $tmpfile
82 rmscip-shell system . . rm. -rf $TESTDIR
83 fi
84
85 mkdirscip-shell system . . mkdir. -p $TESTDIR $DBDIR1
86
87 if testscip-shell system . . test. -f $tmpfile ; then
88 mvscip-shell system . . mv. $tmpfile $LOG1
89 fi
90
91 . $SRCDIR/scripts/relay
92 done
93
94 echoscip-shell system . . echo. ">>>>> Test succeeded"
95
96 testscip-shell system . . test. $KILLSERVERS != no && wait
97
98 exit 0