]> git.sur5r.net Git - openldap/commitdiff
fix ITS#2733
authorJong Hyuk Choi <jongchoi@openldap.org>
Tue, 23 Sep 2003 00:11:46 +0000 (00:11 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Tue, 23 Sep 2003 00:11:46 +0000 (00:11 +0000)
- 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

tests/Makefile.in
tests/scripts/all
tests/scripts/args.sh
tests/scripts/test017-syncreplication-refresh
tests/scripts/test018-syncreplication-persist
tests/scripts/test020-syncreplication-cascading

index 17eb1592ca5a9a0b6be13e8ef0cbc6f45c35e2f9..3184786344c92f0506fb447a67e9908e38cb69e1 100644 (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
index b0b9a94f990cbcaacbfedb9ebf13b6a340ae1d9d..46257d3690b0aa80d97289a74efd799b514d1470 100755 (executable)
@@ -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}."
index bef77b0666f3af8c9ce6b7056259ba0ada88cf49..b13e8af097707c50d8f2447fe7c0e9e51e5c7037 100755 (executable)
@@ -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
index be59b12298236b957414e0b154bf81c9180b944d..aed3a98050141eea89ec37aad89e7762776ace83 100755 (executable)
@@ -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
index 66f5637673511218aaf1df6bf5c451e384d6e213..0a62c9dcecbb2801a3c0834f750234f3d29163f7 100755 (executable)
@@ -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
index 7fff42ec59ee1af28248329dbc2d136ef3f97ca5..bae0f71bfa1736740ece62e35812f57435f5ca1e 100755 (executable)
@@ -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 &