summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2012-01-10 15:00:26 -0500
committerNalin Dahyabhai <nalin@redhat.com>2012-01-10 15:00:26 -0500
commitaa97ed3f671ff1229d26993194afa85468aa77b7 (patch)
treedc1dadb507df0c32737d2cc5e3c961a2f09065ca
parent777314292282904609a3d6541723006dc28325b0 (diff)
- add config snippet for managed-entries and load it by default
-rw-r--r--configure.ac16
-rw-r--r--tests/config/dse.ldif.mep.in12
-rwxr-xr-xtests/run-tests.sh6
-rw-r--r--tests/slapd.sh.in3
4 files changed, 36 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 9f027c6..3b6a592 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,6 +407,7 @@ AC_SUBST(CONFIGURED_LINK_FLAGS)
TESTS_USE_REFINT=true
TESTS_USE_MEMBEROF=true
+TESTS_USE_MANAGED_ENTRIES=true
AC_ARG_ENABLE(tests-with-refint,
AS_HELP_STRING([--disable-tests-with-refint],
[skip tests which use the the refint plugin]),
@@ -427,13 +428,26 @@ AC_ARG_ENABLE(tests-with-memberof,
TESTS_USE_MEMBEROF=false
fi,
AC_MSG_RESULT([running tests with memberof enabled]))
+AC_ARG_ENABLE(tests-with-managed-entries,
+ AS_HELP_STRING([--disable-tests-with-managed-entries],
+ [skip tests which are impacted by the managed entries plugin]),
+ if test x$enableval = xyes ; then
+ AC_MSG_RESULT([running tests with managed entries enabled])
+ else
+ AC_MSG_RESULT([running tests with managed entries disabled])
+ TESTS_USE_MANAGED_ENTRIES=false
+ fi,
+ AC_MSG_RESULT([running tests with managed entries enabled]))
AC_SUBST(TESTS_USE_REFINT)
AC_SUBST(TESTS_USE_MEMBEROF)
+AC_SUBST(TESTS_USE_MANAGED_ENTRIES)
AC_CONFIG_HEADER(src/config.h)
AC_OUTPUT(Makefile yp/Makefile src/Makefile
doc/examples/nis-plugin-example.ldif doc/examples/sch-plugin-example.ldif
tests/Makefile tests/clients/Makefile
tests/slapd.sh tests/config/dse.ldif.initial
- tests/config/dse.ldif.refint tests/config/dse.ldif.memberof
+ tests/config/dse.ldif.refint
+ tests/config/dse.ldif.memberof
+ tests/config/dse.ldif.mep
src/nisserver-plugin-defs.1)
diff --git a/tests/config/dse.ldif.mep.in b/tests/config/dse.ldif.mep.in
new file mode 100644
index 0000000..5cc5ebf
--- /dev/null
+++ b/tests/config/dse.ldif.mep.in
@@ -0,0 +1,12 @@
+dn: cn=Managed Entries,cn=plugins,cn=config
+objectclass: top
+objectclass: nsSlapdPlugin
+objectclass: extensibleObject
+objectclass: nsContainer
+cn: Managed Entries
+nsslapd-pluginpath: libmanagedentries-plugin
+nsslapd-plugininitfunc: mep_init
+nsslapd-plugintype: preoperation
+nsslapd-pluginenabled: on
+nsslapd-plugin-depends-on-type: database
+
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 0961496..904613a 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -23,6 +23,12 @@ for subdir in "$@" ; do
continue
fi
fi
+ if ! $TESTS_USE_MANAGED_ENTRIES ; then
+ if test -s $TESTDIR/$TEST/plugin-need-mep.txt ; then
+ echo Skipping "$TEST", needs the managed entries plugin.
+ continue
+ fi
+ fi
if test -x edit-dse-config.sh ; then
precmd="$TESTDIR/$subdir/edit-dse-config.sh $BTESTDIR/config/dse.ldif"
fi
diff --git a/tests/slapd.sh.in b/tests/slapd.sh.in
index cbe9ef1..ea17561 100644
--- a/tests/slapd.sh.in
+++ b/tests/slapd.sh.in
@@ -69,6 +69,9 @@ startslapd() {
if ! test -s $TESTDIR/$TEST/plugin-skip-memberof.txt ; then
cat $BTESTDIR/config/dse.ldif.memberof >> $BTESTDIR/config/dse.ldif
fi
+ if ! test -s $TESTDIR/$TEST/plugin-skip-mep.txt ; then
+ cat $BTESTDIR/config/dse.ldif.mep >> $BTESTDIR/config/dse.ldif
+ fi
process_all=0
if test -s $TESTDIR/$TEST/plugin-process-all.txt ; then
process_all=1