diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2012-01-09 14:50:23 -0500 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2012-01-09 14:50:23 -0500 |
commit | ec00275ed1173caac8bc1f5b5a1a45d9c3bb25a5 (patch) | |
tree | ebe5f4854bcf1f41ce37e102bd13b212ea35735b | |
parent | ae38c2aa034a74844e2922a1b763442fe399fa63 (diff) | |
download | slapi-nis-ec00275ed1173caac8bc1f5b5a1a45d9c3bb25a5.tar.gz slapi-nis-ec00275ed1173caac8bc1f5b5a1a45d9c3bb25a5.tar.xz slapi-nis-ec00275ed1173caac8bc1f5b5a1a45d9c3bb25a5.zip |
- turn on refint and memberof plugins when running tests
-rwxr-xr-x | autogen.sh | 2 | ||||
-rw-r--r-- | configure.ac | 30 | ||||
-rw-r--r-- | tests/config/dse.ldif.memberof.in | 13 | ||||
-rw-r--r-- | tests/config/dse.ldif.refint.in | 19 | ||||
-rw-r--r-- | tests/slapd.sh.in | 8 |
5 files changed, 69 insertions, 3 deletions
@@ -8,4 +8,4 @@ aclocal --force -I m4 autoheader automake -f -a -i autoconf -f -i -./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/$libarch --enable-maintainer-mode --with-server=dirsrv --with-users="cn=Users, cn=Accounts" --with-groups="cn=Groups, cn=Accounts" "$@" +./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/$libarch --enable-maintainer-mode --with-server=dirsrv --with-users="cn=Users, cn=Accounts" --with-groups="cn=Groups, cn=Accounts" --enable-tests-with-memberof --enable-tests-with-refint "$@" diff --git a/configure.ac b/configure.ac index 805ec15..a3ade02 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ if test x$specversion != x$PACKAGE_VERSION ; then fi AC_ARG_WITH(tcp-wrappers, - AS_HELP_STRING([--with-tcp-wrappers=AUTO] + AS_HELP_STRING([--with-tcp-wrappers=AUTO], [use tcp-wrappers]), tcp_wrappers=$withval,tcp_wrappers=AUTO) if test x$tcp_wrappers != xno ; then @@ -33,7 +33,7 @@ fi AC_SUBST(LIBWRAP) AC_ARG_WITH(tcp-wrappers-name, - AS_HELP_STRING([--with-tcp-wrappers-name=service] + AS_HELP_STRING([--with-tcp-wrappers-name=service], [tcp-wrappers and network service name (nis-plugin)]), tcpwrapname=$withval,tcpwrapname=nis-plugin) AC_DEFINE_UNQUOTED(DEFAULT_TCPWRAP_NAME,"$tcpwrapname", @@ -386,9 +386,35 @@ AC_DEFINE_UNQUOTED(NIS_PLUGIN_CONTINUE_WITHOUT_PORTMAP_ENV,"$NIS_PLUGIN_CONTINUE AC_SUBST(NIS_PLUGIN_CONTINUE_WITHOUT_PORTMAP_ENV) AC_SUBST(TRACE_CMD) +TESTS_USE_REFINT=false +TESTS_USE_MEMBEROF=false +AC_ARG_ENABLE(tests-with-refint, + AS_HELP_STRING([--enable-tests-with-refint], + [load the refint plugin when doing tests]), + if test x$enableval = xyes ; then + AC_MSG_RESULT([running tests with referential integrity enabled]) + TESTS_USE_REFINT=true + else + AC_MSG_RESULT([running tests with referential integrity disabled]) + fi, + AC_MSG_RESULT([running tests with referential integrity disabled])) +AC_ARG_ENABLE(tests-with-memberof, + AS_HELP_STRING([--enable-tests-with-memberof], + [load the memberof plugin when doing tests]), + if test x$enableval = xyes ; then + AC_MSG_RESULT([running tests with memberof enabled]) + TESTS_USE_MEMBEROF=true + else + AC_MSG_RESULT([running tests with memberof disabled]) + fi, + AC_MSG_RESULT([running tests with memberof disabled])) +AC_SUBST(TESTS_USE_REFINT) +AC_SUBST(TESTS_USE_MEMBEROF) + 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 src/nisserver-plugin-defs.1) diff --git a/tests/config/dse.ldif.memberof.in b/tests/config/dse.ldif.memberof.in new file mode 100644 index 0000000..4d731b2 --- /dev/null +++ b/tests/config/dse.ldif.memberof.in @@ -0,0 +1,13 @@ +dn: cn=MemberOf Plugin,cn=plugins,cn=config +objectClass: top +objectClass: nsSlapdPlugin +objectClass: extensibleObject +cn: MemberOf Plugin +nsslapd-pluginpath: libmemberof-plugin +nsslapd-plugininitfunc: memberof_postop_init +nsslapd-plugintype: postoperation +nsslapd-pluginenabled: on +nsslapd-plugin-depends-on-type: database +memberOfGroupAttr: member +memberOfAttr: memberOf + diff --git a/tests/config/dse.ldif.refint.in b/tests/config/dse.ldif.refint.in new file mode 100644 index 0000000..8b217d3 --- /dev/null +++ b/tests/config/dse.ldif.refint.in @@ -0,0 +1,19 @@ +dn: cn=referential integrity postoperation,cn=plugins,cn=config +objectclass: top +objectclass: nsSlapdPlugin +objectclass: extensibleObject +cn: referential integrity postoperation +nsslapd-pluginpath: libreferint-plugin +nsslapd-plugininitfunc: referint_postop_init +nsslapd-plugintype: postoperation +nsslapd-pluginenabled: on +nsslapd-pluginprecedence: 40 +nsslapd-pluginArg0: 0 +nsslapd-pluginArg1: @abs_top_builddir@/tests/state/log/referint +nsslapd-pluginArg2: 0 +nsslapd-pluginArg3: member +nsslapd-pluginArg4: uniquemember +nsslapd-pluginArg5: owner +nsslapd-pluginArg6: seeAlso +nsslapd-plugin-depends-on-type: database + diff --git a/tests/slapd.sh.in b/tests/slapd.sh.in index f63d7a9..2ebb0e7 100644 --- a/tests/slapd.sh.in +++ b/tests/slapd.sh.in @@ -10,6 +10,8 @@ LDIFSORT="@abs_builddir@/clients/ldifsort" export LDIFSORT VALGRIND="valgrind --leak-check=full --log-file=valgrind.log --num-callers=50 --track-origins=yes --show-reachable=yes --suppressions=@abs_srcdir@/slapi-nis.supp --gen-suppressions=all" +TESTS_USE_REFINT=@TESTS_USE_REFINT@ +TESTS_USE_MEMBEROF=@TESTS_USE_MEMBEROF@ PORT=@test_ldapport@ export PORT PW=password @@ -61,6 +63,12 @@ startslapd() { done test -s $BTESTDIR/config/schema/00core.ldif || ln -s -t $BTESTDIR/config $TESTDIR/config/schema cat $BTESTDIR/config/dse.ldif.initial > $BTESTDIR/config/dse.ldif + if $TESTS_USE_REFINT ; then + cat $BTESTDIR/config/dse.ldif.refint >> $BTESTDIR/config/dse.ldif + fi + if $TESTS_USE_MEMBEROF ; then + cat $BTESTDIR/config/dse.ldif.memberof >> $BTESTDIR/config/dse.ldif + fi if test -n "$1" && test -s "$1" ; then cat "$1" >> $BTESTDIR/config/dse.ldif fi |