svn commit: samba r17978 - in branches/SAMBA_4_0/source/lib/ldb/tests: .

tridge at samba.org tridge at samba.org
Fri Sep 1 01:51:55 GMT 2006


Author: tridge
Date: 2006-09-01 01:51:54 +0000 (Fri, 01 Sep 2006)
New Revision: 17978

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17978

Log:

make the ldap backend test for ldb work both with and without modules
(so it works on both redhat and debian, for example)

Modified:
   branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh
   branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh	2006-08-31 20:45:29 UTC (rev 17977)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/init_slapd.sh	2006-09-01 01:51:54 UTC (rev 17978)
@@ -19,5 +19,23 @@
 
 # we don't consider a slapadd failure as a test suite failure, as it
 # has nothing to do with ldb
+
+MODCONF=tests/tmp/modules.conf
+rm -f $MODCONF
+touch $MODCONF || exit 1
+
+if ! slaptest -u -f $LDBDIR/tests/slapd.conf > /dev/null 2>&1; then
+echo "enabling sladp modules"
+cat > $MODCONF <<EOF 
+modulepath	/usr/lib/ldap
+moduleload	back_bdb
+EOF
+fi
+
+if ! slaptest -u -f $LDBDIR/tests/slapd.conf; then
+    echo "slaptest failed - skipping ldap tests"
+    exit 0
+fi
+
 slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 0
 

Modified: branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf	2006-08-31 20:45:29 UTC (rev 17977)
+++ branches/SAMBA_4_0/source/lib/ldb/tests/slapd.conf	2006-09-01 01:51:54 UTC (rev 17978)
@@ -14,8 +14,7 @@
 
 allow update_anon bind_anon_dn
 
-modulepath	/usr/lib/ldap
-moduleload	back_bdb
+include tests/tmp/modules.conf
 
 defaultsearchbase "o=University of Michigan,c=TEST"
 



More information about the samba-cvs mailing list