lloadd-no:
@echo "run configure with --enable-balancer to run the Load Balancer tests"
-lloadd-yes: lloadd-slapd-$(BUILD_SLAPD)
+lloadd-yes lloadd-mod: lloadd-slapd-$(BUILD_SLAPD)
lloadd-slapd-no:
@echo "run configure with --enable-slapd to run the Load Balancer tests"
--- /dev/null
+# stand-alone slapd config -- for testing (with indexing)
+# $OpenLDAP$
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
+##
+## Copyright 1998-2020 The OpenLDAP Foundation.
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted only as authorized by the OpenLDAP
+## Public License.
+##
+## A copy of this license is available in the file LICENSE in the
+## top-level directory of the distribution or, alternatively, at
+## <http://www.OpenLDAP.org/license.html>.
+
+include @SCHEMADIR@/core.schema
+include @SCHEMADIR@/cosine.schema
+include @SCHEMADIR@/inetorgperson.schema
+include @SCHEMADIR@/openldap.schema
+include @SCHEMADIR@/nis.schema
+include @DATADIR@/test.schema
+
+#
+pidfile @TESTDIR@/slapd.1.pid
+argsfile @TESTDIR@/slapd.1.args
+
+# allow big PDUs from anonymous (for testing purposes)
+sockbuf_max_incoming 4194303
+
+modulepath ../servers/lloadd/
+moduleload lloadd.la @TESTDIR@/slapd.1.conf.lloadd "@URI1@"
+
+database monitor
export SRCDIR TOPSRCDIR LN_S EGREP_CMD
+# Load balancer
+AC_lloadd=lloadd@BUILD_BALANCER@
+
# backends known to ./run -b <backend> (used to deduce $BACKENDTYPE)
AC_ldif=yes
AC_mdb=@BUILD_MDB@
AC_accesslog AC_autoca AC_constraint AC_dds AC_dynlist AC_memberof AC_pcache AC_ppolicy \
AC_refint AC_retcode AC_rwm AC_unique AC_syncprov AC_translucent \
AC_valsort \
+ AC_lloadd \
AC_WITH_SASL AC_WITH_TLS AC_WITH_MODULES_ENABLED AC_ACI_ENABLED \
AC_LIBS_DYNAMIC AC_WITH_TLS AC_TLS_TYPE
-e "s/^#${AC_translucent}#//" \
-e "s/^#${AC_unique}#//" \
-e "s/^#${AC_valsort}#//" \
+ -e "s/^#${AC_lloadd}#//" \
-e "s/^#${INDEXDB}#//" \
-e "s/^#${MAINDB}#//" \
-e "s/^#${SASL}#//" \
DYNAMICCONF=$DATADIR/slapd-dynamic.ldif
+SLAPDLLOADCONF=$DATADIR/slapd-lload.conf
LLOADDCONF=$DATADIR/lloadd.conf
LLOADDANONCONF=$DATADIR/lloadd-anon.conf
LLOADDUNREACHABLECONF=$DATADIR/lloadd-backend-issues.conf
KILLPIDS="$KILLPIDS $PID"
echo "Starting lloadd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND < $LLOADDANONCONF > $CONF1
-$LLOADD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
+. $CONFFILTER $BACKEND < $LLOADDANONCONF > $CONF1.lloadd
+if test $AC_lloadd = lloaddyes; then
+ $LLOADD -f $CONF1.lloadd -h $URI1 -d $LVL > $LOG1 2>&1 &
+else
+ . $CONFFILTER $BACKEND < $SLAPDLLOADCONF > $CONF1.slapd
+ # FIXME: this won't work on Windows, but lloadd doesn't support Windows yet
+ $SLAPD -f $CONF1.slapd -h $URI6 -d $LVL > $LOG1 2>&1 &
+fi
PID=$!
if test $WAIT != 0 ; then
echo PID $PID
fi
echo "Starting lloadd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND < $LLOADDUNREACHABLECONF > $CONF1
-$LLOADD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
+. $CONFFILTER $BACKEND < $LLOADDUNREACHABLECONF > $CONF1.lloadd
+if test $AC_lloadd = lloaddyes; then
+ $LLOADD -f $CONF1.lloadd -h $URI1 -d $LVL > $LOG1 2>&1 &
+else
+ . $CONFFILTER $BACKEND < $SLAPDLLOADCONF > $CONF1.slapd
+ $SLAPD -f $CONF1.slapd -h $URI6 -d $LVL > $LOG1 2>&1 &
+fi
PID=$!
if test $WAIT != 0 ; then
echo PID $PID
fi
echo "Starting lloadd on TCP/IP port $PORT1..."
-. $CONFFILTER $BACKEND < $LLOADDCONF > $CONF1
-$LLOADD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
+. $CONFFILTER $BACKEND < $LLOADDCONF > $CONF1.lloadd
+if test $AC_lloadd = lloaddyes; then
+ $LLOADD -f $CONF1.lloadd -h $URI1 -d $LVL > $LOG1 2>&1 &
+else
+ . $CONFFILTER $BACKEND < $SLAPDLLOADCONF > $CONF1.slapd
+ # FIXME: this won't work on Windows, but lloadd doesn't support Windows yet
+ $SLAPD -f $CONF1.slapd -h $URI6 -d $LVL > $LOG1 2>&1 &
+fi
PID=$!
if test $WAIT != 0 ; then
echo PID $PID