From: Kurt Zeilenga Date: Mon, 8 Feb 1999 20:08:25 +0000 (+0000) Subject: Fixup BDB2 switching. Use 'test' instead of '['. Use '=' instead of '=='. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~610 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=eca967ea1daaf44ce4bb7010898edf0c9092d0ff;p=openldap Fixup BDB2 switching. Use 'test' instead of '['. Use '=' instead of '=='. Use $BACKEND instead of BDB2. Fallback to LDBM if $BACKEND is not BDB2. --- diff --git a/tests/Makefile.in b/tests/Makefile.in index 70b0433fd2..aea2c7481b 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 diff --git a/tests/scripts/all b/tests/scripts/all index c582f20e0b..b9f30d52bb 100755 --- a/tests/scripts/all +++ b/tests/scripts/all @@ -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." diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 4e138e5920..f7d9bf8d60 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -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