summaryrefslogtreecommitdiff
path: root/source4/script/tests/selftest.sh
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-09-04 00:32:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:04 -0500
commit36ca11b00a1432654819d9fca75be56ab827e3ca (patch)
treeb14fcd19eadbab2357e326e9e9a4d74dc141f4a3 /source4/script/tests/selftest.sh
parent173d17ab2fdac0491941fc77e731c9617315b0be (diff)
downloadsamba-36ca11b00a1432654819d9fca75be56ab827e3ca.tar.gz
samba-36ca11b00a1432654819d9fca75be56ab827e3ca.tar.bz2
samba-36ca11b00a1432654819d9fca75be56ab827e3ca.zip
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)
Diffstat (limited to 'source4/script/tests/selftest.sh')
-rwxr-xr-xsource4/script/tests/selftest.sh16
1 files changed, 15 insertions, 1 deletions
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)";