Commit ac517f4a authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix cleanup code to use standard expressions for ignoring CVS directories.

Merge from main patch provided by dj@gregor.com.
parent 38c588ae
......@@ -17,6 +17,8 @@ SCRIPTSDIR=./scripts
all: FORCE
@echo "Initiating LDAP tests..."; \
test -d test-db || $(MKDIR) test-db ; \
test -d test-repl || $(MKDIR) test-repl ; \
$(SCRIPTSDIR)/all $(SCRIPTSDIR)
install: FORCE
......@@ -24,7 +26,7 @@ install: FORCE
depend: FORCE
clean: FORCE
$(RM) test-db/* test-repl/*
$(RM) test-db/[!C]* test-repl/[!C]*
veryclean: clean
......
......@@ -4,7 +4,7 @@
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
......
......@@ -5,7 +5,7 @@
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
......@@ -16,7 +16,7 @@ if [ $RC != 0 ]; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to retrieve all the entries..."
......
......@@ -5,10 +5,10 @@
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."
......@@ -44,8 +44,13 @@ if [ $RC != 0 ]; then
exit $RC
fi
echo "Comparing retrieved entries to LDIF file used to create database"
cmp $SEARCHOUT $LDIF
echo "Filtering ldapsearch results..."
. scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. scripts/acfilter.sh < $LDIF > $LDIFFLT
echo "Comparing filter output..."
cmp $SEARCHFLT $LDIFFLT
if [ $? != 0 ]; then
echo "comparison failed - database was not created correctly"
exit 1
......
......@@ -4,7 +4,7 @@
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
......@@ -15,7 +15,7 @@ if [ $RC != 0 ]; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd searching..."
......
......@@ -4,7 +4,7 @@
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
......@@ -15,7 +15,7 @@ if [ $RC != 0 ]; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $CONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd modify operations..."
......
......@@ -4,7 +4,7 @@
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Running ldif2ldbm to build slapd database..."
$LDIF2LDBM -f $CONF -i $LDIF -e ../servers/slapd/tools
......@@ -15,7 +15,7 @@ if [ $RC != 0 ]; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $ACLCONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $ACLCONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd access control..."
......@@ -96,8 +96,7 @@ EOMODS4
echo "Using ldapsearch to retrieve all the entries..."
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
'objectClass=*' | egrep -iv '^modifytimestamp|^modifiersname' \
>> $SEARCHOUT 2>&1
'objectClass=*' | . scripts/acfilter.sh >> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
if [ $RC != 0 ]; then
......
......@@ -13,16 +13,16 @@
. scripts/defines.sh
echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/*
rm -f $DBDIR/[!C]*
echo "Cleaning up in $REPLDIR..."
rm -f $REPLDIR/*
rm -f $REPLDIR/[!C]*
echo "Starting master slapd on TCP/IP port $PORT..."
$SLAPD -f $MASTERCONF -p $PORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $MASTERCONF -p $PORT -d 1 > $MASTERLOG 2>&1 &
PID=$!
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
$SLAPD -f $SLAVECONF -p $SLAVEPORT -d 1 > /dev/null 2>&1 &
$SLAPD -f $SLAVECONF -p $SLAVEPORT -d 1 > $SLAVELOG 2>&1 &
SLAVEPID=$!
echo "Using ldapsearch to check that master slapd is running..."
......@@ -48,7 +48,7 @@ for i in 0 1 2 3 4 5; do
done
echo "Starting slurpd..."
$SLURPD -f $MASTERCONF -d 4 -t $REPLDIR > /dev/null 2>&1 &
$SLURPD -f $MASTERCONF -d 4 -t $REPLDIR > $SLURPLOG 2>&1 &
SLURPPID=$!
echo "Using ldapmodify to populate the database..."
......@@ -123,8 +123,8 @@ changetype: delete
EOMODS
echo "Waiting 10 seconds for slurpd to send changes..."
sleep 10
echo "Waiting 15 seconds for slurpd to send changes..."
sleep 15
echo "Using ldapsearch to read all the entries from the master..."
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment