Rework test suite to use run script.

A little rough around the edges still.
This commit is contained in:
Kurt Zeilenga 2003-10-21 03:08:08 +00:00
parent 4821c2c6ed
commit b8ff29abfd
31 changed files with 131 additions and 477 deletions

View File

@ -3,79 +3,45 @@
## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
## tests Makefile.in for OpenLDAP
RUN=./run
SUBDIRS= progs
BUILD_BDB=@BUILD_BDB@
BUILD_HDB=@BUILD_HDB@
BUILD_LDBM=@BUILD_LDBM@
BUILD_MONITOR=@BUILD_MONITOR@
BUILD_CACHE=@BUILD_CACHE@
WITH_TLS=@WITH_TLS@
test tests:
@$(MAKE) bdb
@$(MAKE) hdb
@$(MAKE) ldbm
links: data schema ucdata
data:
@-$(LN_S) $(srcdir)/data .
schema:
@-$(LN_S) $(top_srcdir)/servers/slapd/schema .
ucdata:
@-$(LN_S) ../libraries/liblunicode ucdata
dirs: test-db test-repl
test-db test-repl:
@$(MKDIR) $@
bdb test-bdb: bdb-$(BUILD_BDB)
bdb-no:
@echo "run configure with --enable-bdb"
bdb-yes bdb-mod: links dirs FORCE
bdb-yes bdb-mod: FORCE
@echo "Initiating LDAP tests for BDB..."
@MONITORDB=$(BUILD_MONITOR) PROXYCACHE=$(BUILD_CACHE) WITHTLS=$(WITH_TLS) BACKENDTYPE=$(BUILD_BDB) $(srcdir)/scripts/all $(srcdir) bdb bdb
@$(RUN) -b bdb all
hdb test-hdb: hdb-$(BUILD_HDB)
hdb-no:
@echo "run configure with --enable-hdb"
hdb-yes hdb-mod: links dirs FORCE
hdb-yes hdb-mod: FORCE
@echo "Initiating LDAP tests for HDB..."
@MONITORDB=$(BUILD_MONITOR) PROXYCACHE=$(BUILD_CACHE) WITHTLS=$(WITH_TLS) BACKENDTYPE=$(BUILD_HDB) $(srcdir)/scripts/all $(srcdir) hdb hdb
@$(RUN) -b hdb all
ldbm test-ldbm: ldbm-$(BUILD_LDBM)
ldbm-no:
@echo "run configure with --enable-ldbm"
ldbm-yes ldbm-mod: links dirs FORCE
ldbm-yes ldbm-mod: FORCE
@echo "Initiating LDAP tests for LDBM..."
@MONITORDB=$(BUILD_MONITOR); PROXYCACHE=$(BUILD_CACHE); WITHTLS=$(WITH_TLS) \
BACKENDTYPE=$(BUILD_LDBM); \
export MONITORDB PROXYCACHE WITHTLS BACKENDTYPE; \
if test "$(BUILD_BDB)" != "no"; then \
$(srcdir)/scripts/all $(srcdir) ldbm bdb ; \
else \
if test "$(BUILD_HDB)" != "no"; then \
$(srcdir)/scripts/all $(srcdir) ldbm hdb ; \
else \
$(srcdir)/scripts/all $(srcdir) ldbm no ; \
fi ; \
fi
passwd test-passwd: links dirs FORCE
@echo "Initiating LDAP tests..."
@$(srcdir)/scripts/passwd-search $(srcdir) passwd
test-nis-schema: test-nis-schema-ldbm
test-nis-schema-ldbm: links dirs FORCE
@echo "Initiating LDAP server with NIS schema & ldbm backend..."; \
$(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) ldbm
@$(RUN) -b ldbm all
clean-local: FORCE
-$(RM) -r test-db/[!C]* test-repl/[!C]* test-cache/[!C]* *leak *gmon *core
-$(RM) -r test-db* test-repl* *leak *gmon *core
veryclean-local: FORCE
@-$(RM) data schema ucdata
-$(RM) -r test-db test-repl test-cache

View File

@ -3,6 +3,7 @@ verify basic functionality of the LDAP libraries, slapd, and slurpd.
To run all of the tests, type "make test".
To run BDB tests, type "make bdb".
To run HDB tests, type "make hdb".
To run LDBM tests, type "make ldbm".
The test scripts depends on a number of tools commonly available on

View File

@ -22,7 +22,7 @@ pidfile ./test-db/slapd.pid
argsfile ./test-db/slapd.args
#
rootdse ./data/rootdse.ldif
rootdse ./testdata/rootdse.ldif
modulepath ../servers/slapd/back-@BACKEND@/
@MODULELOAD@

View File

@ -1,9 +1,14 @@
#!/bin/sh
USAGE="$0 [-d <db>] <script>"
USAGE="$0 [-b <backend>] <script>"
# configure generated
SRCDIR=@srcdir@
SRCDIR="@srcdir@"
TOPSRCDIR="@top_srcdir@"
LN_S="@LN_S@"
export SRCDIR TOPSRCDIR LN_S
AC_BDB=@BUILD_BDB@
AC_HDB=@BUILD_HDB@
AC_LDBM=@BUILD_LDBM@
@ -11,6 +16,13 @@ AC_MONITOR=@BUILD_MONITOR@
AC_CACHE=@BUILD_CACHE@
AC_WITH_TLS=@WITH_TLS@
export AC_MONITOR AC_CACHE AC_WITH_TLS
if test ! -x ../servers/slapd/slapd ; then
echo "Could not locate slapd(8)"
exit 1
fi
if test $AC_BDB = yes ; then
BACKEND=bdb
elif test $AC_LDBM = yes ; then
@ -22,12 +34,23 @@ else
exit 1
fi
CLEAN=no
WAIT=0
while test $# -gt 0 ; do
case "$1" in
-d | -database)
$BACKEND="$2"
-b | -backend)
BACKEND="$2"
shift; shift ;;
-c | -clean)
CLEAN=yes
shift; shift ;;
-w | -wait)
CLEAN=1
shift ;;
-)
shift
break ;;
@ -41,18 +64,44 @@ while test $# -gt 0 ; do
esac
done
if test $# != 1 ; then
export BACKEND WAIT
if test $# = 0 ; then
echo "$USAGE"; exit 1
fi
SCRIPT="${SRCDIR}/scripts/$1"
shift
if test ! -x "${SCRIPT}" ; then
echo "run: ${SCRIPT} not found (or not executable)"
exit 1;
fi
export BACKEND AC_MONITOR AC_CACHE AC_WITH_TLS
if test ! -e testdata/test.ldif ; then
${LN_S} ${SRCDIR}/data testdata
fi
if test ! -e schema/core.schema ; then
${LN_S} ${TOPSRCDIR}/servers/slapd/schema schema
fi
if test ! -e ucdata/UnicodeData.txt ; then
${LN_S} ${TOPSRCDIR}/libraries/liblunicode ucdata
fi
echo "Cleaning up directories leftover from previous run."
/bin/rm -rf test-db test-repl test-db2 test-repl2 test-db3 test-repl3
# disable LDAP initialization
LDAPNOINIT=true; export LDAPNOINIT
echo "Running ${SCRIPT}..."
$SCRIPT
exit 0
$SCRIPT $*
RC=$?
if test $CLEAN = yes ; then
echo "Cleaning up directories leftover from this run."
/bin/rm -rf test-db test-repl test-db2 test-repl2 test-db3 test-repl3
echo "Cleaning up symlinks."
/bin/rm -f testdata schema ucdata
fi
exit $RC

View File

@ -1,50 +1,19 @@
#! /bin/sh
# $OpenLDAP$
# disable LDAP initialization
LDAPNOINIT=true; export LDAPNOINIT
echo ">>>>> Executing all LDAP tests..."
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
echo ">>>>> Test Directory: $SRCDIR"
if test $# -eq 0 ; then
BACKEND=bdb
else
BACKEND=$1; shift
fi
echo ">>>>> Backend: $BACKEND"
MONITORDB=${MONITORDB-no}
PROXYCACHE=${PROXYCACHE-no}
WITHTLS=${WITHTLS-no}
BACKENDTYPE=${BACKENDTYPE-yes}
export MONITORDB PROXYCACHE WITHTLS BACKENDTYPE
echo ">>>>> Backend Type: $BACKENDTYPE"
if test $# -eq 0 ; then
SYNCREPL=no
else
SYNCREPL=$1; shift
fi
SHTOOL="$SRCDIR/../build/shtool"
TB=`$SHTOOL echo -e "%B"`
TN=`$SHTOOL echo -e "%b"`
echo ">>>>> Executing all LDAP tests for $BACKEND"
for CMD in $SRCDIR/scripts/test*; do
# remove cruft from prior test
/bin/rm -rf test-db test-db1 test-db2
/bin/rm -rf test-repl test-repl1 test-repl2
echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..."
$CMD $SRCDIR $BACKEND $SYNCREPL
$CMD
RC=$?
if test $RC -eq 0 ; then
echo ">>>>> $CMD completed ${TB}OK${TN}."
@ -52,6 +21,7 @@ for CMD in $SRCDIR/scripts/test*; do
echo ">>>>> $CMD ${TB}failed${TN} (exit $RC)"
exit $RC
fi
echo ">>>>> waiting 10 seconds for things to exit"
sleep 10
echo ""

View File

@ -1,16 +0,0 @@
# $OpenLDAP$
BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
SYNCREPL=no
if test $# -ge 1 ; then
SYNCREPL=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
fi

View File

@ -14,5 +14,5 @@ sed -e "s/@BACKEND@/${BACKEND}/" \
-e "s/^#${MON}#//" \
-e "s/@PORT@/${PORT}/" \
-e "s/@SLAVEPORT@/${SLAVEPORT}/" \
-e "s/@CACHETTL@/${CACHETTL}/" \
-e "s/@ENTRY_LIMIT@/${CACHE_ENTRY_LIMIT}/"
-e "s/@CACHETTL@/${CACHETTL}/" \
-e "s/@ENTRY_LIMIT@/${CACHE_ENTRY_LIMIT}/"

View File

@ -1,16 +1,21 @@
#! /bin/sh
# $OpenLDAP$
DATADIR=$SRCDIR/data
DATADIR=./testdata
PROGDIR=./progs
DBDIR=./test-db
CACHEDIR=./test-db2
REPLDIR=./test-repl
R1REPLDIR=$REPLDIR/r1
R2REPLDIR=$REPLDIR/r2
P1REPLDIR=$REPLDIR/p1
P2REPLDIR=$REPLDIR/p2
P3REPLDIR=$REPLDIR/p3
CACHEDIR=./test-cache
R1REPLDIR=${REPLDIR}/r1
R2REPLDIR=${REPLDIR}/r2
P1REPLDIR=${REPLDIR}/p1
P2REPLDIR=${REPLDIR}/p2
P3REPLDIR=${REPLDIR}/p3
MONITORDB=${AC_MONITOR-no}
PROXYCACHE=${AC_CACHE-no}
WITHTLS=${AC_WITHTLS-yes}
CONF=$DATADIR/slapd.conf
MCONF=$DATADIR/slapd-master.conf
@ -155,5 +160,6 @@ REPLOUTMASTER=$DATADIR/repl.out.master
MODSRCHFILTERS=$DATADIR/modify.search.filters
CERTIFICATETLS=$DATADIR/certificate.tls
CERTIFICATEOUT=$DATADIR/certificate.out
# Just in case we linked the binaries dynamically
LD_LIBRARY_PATH=`pwd`/../libraries:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH

View File

@ -1,16 +0,0 @@
#! /bin/sh
# $OpenLDAP$
. scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
$slapadd -f $CONF -l $LDIF
RC=$?
if test $RC != 0 ; then
echo "slapadd failed!"
exit $RC
fi

View File

@ -1,21 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $SCHEMACONF > $DBCONF
@ -57,5 +46,4 @@ else
fi
fi
exit $RC

View File

@ -1,21 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $ADDCONF
@ -68,6 +57,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
@ -71,6 +62,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $MCONF > $ADDCONF
@ -129,6 +120,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,22 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "running defines.sh $SRCDIR $BACKEND"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
@ -175,5 +163,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
@ -216,5 +207,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $ACLCONF > $DBCONF
@ -166,6 +157,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,16 +1,11 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
mkdir $DBDIR $REPLDIR
#
# Test replication:
# - start master
@ -27,11 +22,6 @@ if test ! -x $SLURPD ; then
exit 0
fi
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Cleaning up in $REPLDIR..."
rm -rf $REPLDIR/[!C]*
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $MASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
@ -222,6 +212,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,21 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
@ -83,6 +72,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,13 +1,6 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
@ -15,11 +8,7 @@ echo "running defines.sh"
# Test default referral
#
echo "Cleaning up in $DBDIR and $REPLDIR ..."
rm -f $DBDIR/[!C]*
rm -f $REPLDIR/[!C]*
mkdir $DBDIR $REPLDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
@ -148,6 +137,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $PWCONF > $DBCONF
@ -138,5 +129,4 @@ fi
kill -HUP $PID
echo ">>>>> Test succeeded"
exit 0

View File

@ -4,17 +4,11 @@
echo "Test disabled."
exit 0
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
#
mkdir $DBDIR $REPLDIR
# Test replication:
# - start master
# - start slave
@ -23,7 +17,6 @@ echo "running defines.sh"
# - populate over ldap
# - perform some modifies and deleted
# - retrieve database over ldap and compare against expected results
#
if test ! -x $SLURPD ; then
echo ">>>>> $SLURPD is not executable or do not exist."
@ -270,5 +263,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,21 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
mkdir $DBDIR/C_db1 $DBDIR/C_db2 $DBDIR/C_db3
rm -f $DBDIR/[!C]* $DBDIR/C_db?/*
mkdir $DBDIR $DBDIR/C_db1 $DBDIR/C_db2 $DBDIR/C_db3
echo "Running slapadd to build glued slapd databases..."
. $CONFFILTER $BACKEND $MONITORDB < $GLUECONF > $DBCONF
@ -71,7 +60,6 @@ if test $? != 0 ; then
fi
echo "OK... Cleaning up in $DBDIR..."
rm -f $DBDIR/C_db?/*
echo "Starting slapd on TCP/IP port $PORT..."
@ -129,6 +117,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
@ -105,6 +96,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $PWCONF > $DBCONF
@ -92,5 +83,4 @@ fi
kill -HUP $PID
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,19 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $MCONF > $ADDCONF
@ -154,6 +145,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -2,19 +2,11 @@
# $OpenLDAP$
RCODE=10
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $RCONF > $DBCONF
@ -182,6 +174,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,16 +1,12 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
mkdir $DBDIR
mkdir $REPLDIR $REPLDIR/r1
#
# Test replication:
# - start master
@ -20,20 +16,6 @@ echo "running defines.sh"
# - retrieve database over ldap and compare against expected results
#
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Resetting $R1REPLDIR..."
rm -rf $R1REPLDIR
mkdir $R1REPLDIR
SAVE=$BACKEND
if test $BACKEND = ldbm; then
if test $SYNCREPL = no; then
echo "Sync replication requires back-bdb or back-hdb"
exit 0
fi
BACKEND=$SYNCREPL
fi
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
@ -42,7 +24,6 @@ if test $WAIT != 0 ; then
echo PID $PID
read foo
fi
BACKEND=$SAVE
echo "Using ldapsearch to check that master slapd is running..."
for i in 0 1 2 3 4 5; do
@ -95,7 +76,7 @@ done
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID
kill -HUP $PID $SLAVEPID
exit $RC
fi
@ -235,6 +216,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,16 +1,11 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
mkdir $DBDIR $REPLDIR $REPLDIR/p1
#
# Test replication:
# - start master
@ -20,20 +15,6 @@ echo "running defines.sh"
# - retrieve database over ldap and compare against expected results
#
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Resetting $P1REPLDIR..."
rm -rf $P1REPLDIR
mkdir $P1REPLDIR
SAVE=$BACKEND
if test $BACKEND = ldbm; then
if test $SYNCREPL = no; then
echo "Sync replication requires back-bdb or back-hdb"
exit 0
fi
BACKEND=$SYNCREPL
fi
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
@ -42,7 +23,6 @@ if test $WAIT != 0 ; then
echo PID $PID
read foo
fi
BACKEND=$SAVE
echo "Using ldapsearch to check that master slapd is running..."
for i in 0 1 2 3 4 5; do
@ -235,6 +215,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -4,20 +4,14 @@
CACHETTL=60
CACHE_ENTRY_LIMIT=10
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
. $SRCDIR/scripts/defines.sh
if test $PROXYCACHE = no; then
echo "Proxy caching requires back-meta AND (back-ldbm OR back-bdb)"
exit 0
fi
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
mkdir $DBDIR $CACHEDIR
# Test proxy caching:
# - start master
@ -28,28 +22,6 @@ echo "running defines.sh"
# - perform second set of searches at the proxy
# - verify answerability
#if test ! -x $SLAPD ; then
# echo ">>>>> $SLAPD is not executable or does not exist."
# echo ">>>>> Test skipped."
# exit 0
#fi
if test ! -d $DBDIR
then
mkdir $DBDIR
fi
if test ! -d $CACHEDIR
then
mkdir $CACHEDIR
fi
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Cleaning up in $CACHEDIR..."
rm -rf $CACHEDIR/[!C]*
echo $DBDIR
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER < $CACHEMASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL > $MASTERLOG 2>&1 &
@ -219,6 +191,7 @@ echo "Query 11: filter:(mail=*@example.com) cn sn title uid"
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $SLAVEPORT \
'mail=jaj@mail.alumni.example.com' cn sn title uid >> $SLAVEOUT 2>&1
RC=$?
if test $RC != 0 ; then
echo "ldapsearch failed ($RC)!"
kill -HUP $PID $CACHEPID
@ -243,8 +216,10 @@ ANSWERED=`grep ANSWERABLE $SLAVELOG | awk '{
printf "1"
}
}'`
if test $ANSWERABILITY = $ANSWERED
then
kill -HUP $PID $CACHEPID
if test $ANSWERABILITY = $ANSWERED ; then
echo "successfully verified answerability"
else
echo "error in verifying answerability"
@ -252,5 +227,5 @@ else
exit 1
fi
echo "Proxy cache successfully tested"
kill -HUP $PID $CACHEPID
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,16 +1,14 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
echo "skipped"
exit 0
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
mkdir $DBDIR
mkdir $REPLDIR $REPLDIR/r1 $REPLDIR/r2 $REPLDIR/p1 $REPLDIR/p2 $REPLDIR/p3
#
# Test replication:
# - start master
@ -20,33 +18,6 @@ echo "running defines.sh"
# - retrieve database over ldap and compare against expected results
#
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Resetting $R1REPLDIR..."
rm -rf $R1REPLDIR
mkdir $R1REPLDIR
echo "Resetting $R2REPLDIR..."
rm -rf $R2REPLDIR
mkdir $R2REPLDIR
echo "Resetting $P1REPLDIR..."
rm -rf $P1REPLDIR
mkdir $P1REPLDIR
echo "Resetting $P2REPLDIR..."
rm -rf $P2REPLDIR
mkdir $P2REPLDIR
echo "Resetting $P3REPLDIR..."
rm -rf $P3REPLDIR
mkdir $P3REPLDIR
SAVE=$BACKEND
if test $SYNCREPL = no; then
if test $BACKEND = ldbm; then
echo "Sync replication requires back-bdb or back-hdb"
exit 0
fi
SYNCREPL=$BACKEND
fi
BACKEND=$SYNCREPL
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
@ -139,7 +110,6 @@ if test $RC != 0 ; then
exit $RC
fi
BACKEND=$SYNCREPL
echo "Starting P1 slave slapd on TCP/IP port $P1SLAVEPORT..."
. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $P1REPLCONF
$SLAPD -f $P1REPLCONF -h $P1SLAVEURI -d $LVL $TIMING > $P1SLAVELOG 2>&1 &
@ -446,6 +416,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0

View File

@ -1,22 +1,10 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
. $SRCDIR/scripts/args.sh $*
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "running defines.sh $SRCDIR $BACKEND"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
mkdir $DBDIR
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
@ -279,5 +267,4 @@ if test $? != 0 ; then
fi
echo ">>>>> Test succeeded"
exit 0