From 36ca11b00a1432654819d9fca75be56ab827e3ca Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 4 Sep 2006 00:32:46 +0000 Subject: r18023: Add support infrusructure for testing against an OpenLDAP server. This will give a bit more noise on platforms without OpenLDAP (when we run the slaptest check), but it shouldn't be too bad. We don't start the LDAP server or re-provision unless LDAP_TEST is set. Andrew Bartlett (This used to be commit 999d989131f41d0218ec05595c9761aff5bbf5fa) --- source4/script/tests/selftest.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'source4/script/tests/selftest.sh') diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh index e28aaf60df..b09399f032 100755 --- a/source4/script/tests/selftest.sh +++ b/source4/script/tests/selftest.sh @@ -3,7 +3,7 @@ if [ $# -lt 1 ] then - echo "$0 PREFIX" + echo "$0 PREFIX TESTS" exit fi @@ -54,6 +54,16 @@ fi incdir=`dirname $ARG0` . $incdir/test_functions.sh +#Start slapd before smbd +if [ x"$TEST_LDAP" = x"yes" ]; then + slapd_start + echo -n "LDAP PROVISIONING..." + if ! $srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-backend=$LDAPI; then + echo "LDAP PROVISIONING failed: $srcdir/bin/smbscript $srcdir/setup/provision $PROVISION_OPTIONS --ldap-backend=$LDAPI" + exit 1; + fi +fi + SMBD_TEST_FIFO="$PREFIX/smbd_test.fifo" export SMBD_TEST_FIFO SMBD_TEST_LOG="$PREFIX/smbd_test.log" @@ -100,6 +110,10 @@ failed=$? kill `cat $PIDDIR/smbd.pid` +if [ "$TEST_LDAP"x = "yesx" ]; then + kill `cat $PIDDIR/slapd.pid` +fi + END=`date` echo "START: $START ($ARG0)"; echo "END: $END ($ARG0)"; -- cgit