[Pkg-openldap-devel] [openldap] 192/209: ITS#8644 wait for slapd to start in test064

Ryan Tandy rtandy-guest at moszumanska.debian.org
Tue Jul 18 03:51:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

rtandy-guest pushed a commit to branch upstream
in repository openldap.

commit 8d655d7733fdb9670b1d1fe75b2ab6292c62f330
Author: Ryan Tandy <ryan at nardis.ca>
Date:   Tue Apr 25 01:28:25 2017 +0000

    ITS#8644 wait for slapd to start in test064
---
 tests/scripts/test064-constraint | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/scripts/test064-constraint b/tests/scripts/test064-constraint
index 94f86be..2ac53ac 100755
--- a/tests/scripts/test064-constraint
+++ b/tests/scripts/test064-constraint
@@ -117,6 +117,23 @@ if test $WAIT != 0 ; then
 fi
 sleep 1
 
+echo "Using ldapsearch to check that slapd is running..."
+for i in 0 1 2 3 4 5; do
+	$LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
+		'objectclass=*' > /dev/null 2>&1
+	RC=$?
+	if test $RC = 0 ; then
+		break
+	fi
+	echo "Waiting 5 seconds for slapd to start..."
+	sleep 5
+done
+if test $RC != 0 ; then
+	echo "ldapsearch failed ($RC)!"
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
+	exit $RC
+fi
+
 echo "Adding basic structure..."
 $LDAPADD -D "$MANAGERDN" -H $URI1 -w $PASSWD -f $ROOTLDIF &>/dev/null
 RC=$?

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git



More information about the Pkg-openldap-devel mailing list