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
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."
-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