@if test "$(BUILD_BDB)" != "no"; then \
echo "Initiating LDAP tests for BDB..." ; \
$(MKDIR) test-db test-repl || true; \
- $(srcdir)/scripts/all $(srcdir) bdb $(BUILD_BDB) $(BUILD_MONITOR) $(BUILD_CACHE) ; \
+ $(srcdir)/scripts/all $(srcdir) bdb $(BUILD_BDB) $(BUILD_MONITOR) $(BUILD_CACHE) bdb ; \
else \
echo "run configure with --enable-bdb" ; \
fi
@if test "$(BUILD_HDB)" != "no" ; then \
echo "Initiating LDAP tests for HDB..." ; \
$(MKDIR) test-db test-repl || true; \
- $(srcdir)/scripts/all $(srcdir) hdb $(BUILD_HDB) $(BUILD_MONITOR) $(BUILD_CACHE) ; \
+ $(srcdir)/scripts/all $(srcdir) hdb $(BUILD_HDB) $(BUILD_MONITOR) $(BUILD_CACHE) hdb ; \
else \
echo "run configure with --enable-hdb" ; \
fi
@-$(LN_S) $(srcdir)/data .
@-$(LN_S) $(top_srcdir)/servers/slapd/schema .
@-$(LN_S) ../libraries/liblunicode ucdata
- @if test "$(BUILD_LDBM)" != "no"; then \
+ @if test "$(BUILD_LDBM)" != "no" ; then \
echo "Initiating LDAP tests for LDBM..." ; \
$(MKDIR) test-db test-repl || true; \
- $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE); \
+ if test "$(BUILD_BDB)" != "no"; then \
+ $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE) bdb ; \
+ else \
+ if test "$(BUILD_HDB)" != "no"; then \
+ $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE) hdb ; \
+ else \
+ $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE) no ; \
+ fi ; \
+ fi ; \
else \
echo "run configure with --enable-ldbm" ; \
fi
PROXYCACHE=$1; shift
fi
+if test $# -eq 0 ; then
+ SYNCREPL=no
+else
+ SYNCREPL=$1; shift
+fi
+
TB=`$SHTOOL echo -e "%B"`
TN=`$SHTOOL echo -e "%b"`
for CMD in $SRCDIR/scripts/test*; do
echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..."
- $CMD $SRCDIR $BACKEND $BACKENDTYPE $MONITOR $PROXYCACHE
+ $CMD $SRCDIR $BACKEND $BACKENDTYPE $MONITOR $PROXYCACHE $SYNCREPL
RC=$?
if test $RC -eq 0 ; then
echo ">>>>> $CMD completed ${TB}OK${TN}."
PROXYCACHE=$1; shift
fi
+SYNCREPL=no
+if test $# -ge 1 ; then
+ SYNCREPL=$1; shift
+fi
+
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
SAVE=$BACKEND
if test $BACKEND = ldbm; then
- BACKEND=bdb
+ 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
SAVE=$BACKEND
if test $BACKEND = ldbm; then
- BACKEND=bdb
+ 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
SAVE=$BACKEND
if test $BACKEND = ldbm; then
- BACKEND=bdb
+ 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
fi
SAVE=$BACKEND
-BACKEND=bdb
+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 R1 slave slapd on TCP/IP port $R1SLAVEPORT..."
. $CONFFILTER $BACKEND $MONITORDB < $R1SRSLAVECONF > $R1REPLCONF
$SLAPD -f $R1REPLCONF -h $R1SLAVEURI -d $LVL $TIMING > $R1SLAVELOG 2>&1 &
sleep 10
SAVE=$BACKEND
-BACKEND=bdb
+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 P1 slave slapd on TCP/IP port $P1SLAVEPORT..."
. $CONFFILTER $BACKEND $MONITORDB < $P1SRSLAVECONF > $P1REPLCONF
$SLAPD -f $P1REPLCONF -h $P1SLAVEURI -d $LVL $TIMING > $P1SLAVELOG 2>&1 &