diff options
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-x | source4/lib/ldb/tests/init_slapd.sh | 18 | ||||
-rw-r--r-- | source4/lib/ldb/tests/slapd.conf | 3 |
2 files changed, 19 insertions, 2 deletions
diff --git a/source4/lib/ldb/tests/init_slapd.sh b/source4/lib/ldb/tests/init_slapd.sh index be06ac0d74..8ebfed9c66 100755 --- a/source4/lib/ldb/tests/init_slapd.sh +++ b/source4/lib/ldb/tests/init_slapd.sh @@ -19,5 +19,23 @@ fi # 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 diff --git a/source4/lib/ldb/tests/slapd.conf b/source4/lib/ldb/tests/slapd.conf index fc9d659b0b..fa2789d8c1 100644 --- a/source4/lib/ldb/tests/slapd.conf +++ b/source4/lib/ldb/tests/slapd.conf @@ -14,8 +14,7 @@ access to * by * write 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" |