]> git.sur5r.net Git - openldap/commitdiff
Fixup BDB2 switching. Use 'test' instead of '['. Use '=' instead of '=='.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 8 Feb 1999 20:08:25 +0000 (20:08 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 8 Feb 1999 20:08:25 +0000 (20:08 +0000)
Use $BACKEND instead of BDB2.  Fallback to LDBM if $BACKEND is not BDB2.

tests/Makefile.in
tests/scripts/all
tests/scripts/defines.sh

index 70b0433fd2a2d7e8d3f8d362b03ea4ce1261ae56..aea2c7481b5a1da5b720867213357aea7e88ce0f 100644 (file)
@@ -5,13 +5,13 @@
 BUILD_BDB2 = @BUILD_BDB2@
 
 bdb2-local:    FORCE
-       @if [ "$(BUILD_BDB2)" = "yes" ]; then \
-               @-$(LN_S) $(srcdir)/data .; \
-               echo "Initiating LDAP tests..."; \
+       @if test "$(BUILD_BDB2)" = "yes" ; then \
+               $(LN_S) $(srcdir)/data . ; \
+               echo "Initiating LDAP tests..." ; \
                $(MKDIR) test-db test-repl ; \
-               $(srcdir)/scripts/all $(srcdir) bdb2;\
+               $(srcdir)/scripts/all $(srcdir) bdb2 ; \
        else \
-               echo "run configure with --enable-bdb2"; \
+               echo "run configure with --enable-bdb2" ; \
        fi
 
 all-local:     FORCE
index c582f20e0ba907d15bd1d2daf23480b97d8854dc..b9f30d52bb7e4e9a4c1db97dc70770fb9b7d82f8 100755 (executable)
@@ -5,25 +5,25 @@ LDAPNOINIT=true; export LDAPNOINIT
 
 echo ">>>>> Executing all LDAP tests..."
 
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
        SRCDIR="."
 else
        SRCDIR=$1; shift
 fi
+
 echo ">>>>> Test Directory: $SRCDIR"
 
-if [ $# -eq 1 ]; then
-       BDB2=$1; shift
-       if [ "$BDB2" == "ldbm" ]; then
-               echo ">>>>> LDBM mode"
-       else
-               echo ">>>>> BDB2 mode"
-       fi
+if test $# -eq 0 ; then
+       BACKEND=ldbm
+else
+       BACKEND=$1; shift
 fi
 
+echo ">>>>> Backend: $BACKEND"
+
 for CMD in $SRCDIR/scripts/test*; do
        echo ">>>>> Starting `basename $CMD` ..."
-       $CMD $SRCDIR $BDB2
+       $CMD $SRCDIR $BACKEND
        RC=$?
        if [ $RC -eq 0 ]; then
                echo ">>>>> $CMD completed OK."
index 4e138e59208adc3013b21cba5e73e78270a657de..f7d9bf8d60791e83b31e258f588557a0fbe5b265 100755 (executable)
@@ -1,15 +1,17 @@
-if [ $# -eq 0 ]; then
+if test $# -eq 0 ; then
        SRCDIR="."
 else
        SRCDIR=$1; shift
 fi
-if [ $# -eq 1 ]; then
-       BDB2=$1; shift
+if test $# -eq 0 ; then
+       BACKEND=ldbm
+else
+       BACKEND=$1; shift
 fi
 
 DATADIR=$SRCDIR/data
 
-if [ $BDB2 == "bdb2" ]; then
+if test "$BACKEND" = "bdb2" ; then
        LDIF2LDBM=../servers/slapd/tools/ldif2ldbm-bdb2
        CONF=$DATADIR/slapd-bdb2-master.conf
        ACLCONF=$DATADIR/slapd-bdb2-acl.conf