fix ITS#2733

- if test back-ldbm then
-    run the provider with back-bdb when back-bdb is configured
-    run the provider with back-hdb when back-hdb is configured
-    exit when neither is configured
This commit is contained in:
Jong Hyuk Choi 2003-09-23 00:11:46 +00:00
parent 38a406c8ab
commit e6006f9057
6 changed files with 53 additions and 10 deletions

View file

@ -27,7 +27,7 @@ test-bdb: FORCE
@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
@ -40,7 +40,7 @@ test-hdb: FORCE
@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
@ -50,10 +50,18 @@ test-ldbm: FORCE
@-$(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

View file

@ -44,12 +44,18 @@ else
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}."

View file

@ -20,6 +20,11 @@ if test $# -ge 1 ; then
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

View file

@ -28,7 +28,11 @@ mkdir $R1REPLDIR
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

View file

@ -28,7 +28,11 @@ mkdir $P1REPLDIR
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

View file

@ -40,7 +40,11 @@ mkdir $P3REPLDIR
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
@ -78,7 +82,13 @@ if test $RC != 0 ; then
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 &
@ -129,7 +139,13 @@ echo "Waiting for the R2 slave to replicate..."
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 &