summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-03-02 15:56:27 +0100
committerSimo Sorce <ssorce@redhat.com>2009-03-02 12:00:38 -0500
commit96f72fd795180846831d22ef261ccacfbfbcf25b (patch)
tree769bb87eedafc843804f11badfe5fd92ef9d1487
parent5e3966c99180abdcd1e21774a882f1c14c47aae8 (diff)
downloadsssd-96f72fd795180846831d22ef261ccacfbfbcf25b.tar.gz
sssd-96f72fd795180846831d22ef261ccacfbfbcf25b.tar.bz2
sssd-96f72fd795180846831d22ef261ccacfbfbcf25b.zip
Make tests configurable
-rw-r--r--server/Makefile.in7
-rw-r--r--server/conf_macros.m417
-rw-r--r--server/configure.ac4
-rw-r--r--sssd.spec3
4 files changed, 26 insertions, 5 deletions
diff --git a/server/Makefile.in b/server/Makefile.in
index dd64b7ee..7a576e4a 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -83,6 +83,7 @@ MDLD_FLAGS = @MDLD_FLAGS@
HAVE_INFOPIPE = @HAVE_INFOPIPE@
HAVE_POLICYKIT = @HAVE_POLICYKIT@
+HAVE_TESTS = @HAVE_TESTS@
MEMBEROF_SOBASE=memberof.$(SHLIBEXT)
MEMBEROF_SONAME=$(MEMBEROF_SOBASE).0
@@ -118,8 +119,10 @@ ifneq (x$(HAVE_POLICYKIT), x)
endif
BINS = sbin/sssd $(LIBEXECBINS)
-TESTS = tests/sysdb-tests tests/infopipe-tests
-TESTS_DATA = tests/tests.ldb tests/tests_conf.ldb tests/introspect.ref
+ifneq (x$(HAVE_TESTS), x)
+ TESTS = tests/sysdb-tests tests/infopipe-tests
+ TESTS_DATA = tests/tests.ldb tests/tests_conf.ldb tests/introspect.ref
+endif
SOLIBS = lib/$(PROXY_BE_SOLIB) lib/$(LDAP_BE_SOLIB)
LDBLIBS = lib/$(MEMBEROF_SOLIB)
diff --git a/server/conf_macros.m4 b/server/conf_macros.m4
index 2c182cc1..a65b5130 100644
--- a/server/conf_macros.m4
+++ b/server/conf_macros.m4
@@ -90,3 +90,20 @@ AC_DEFUN(WITH_INFOPIPE,
fi
])
+AC_DEFUN(WITH_TESTS,
+ [ AC_ARG_WITH([tests],
+ [AC_HELP_STRING([--with-tests],
+ [Whether to build tests [no]]
+ )
+ ],
+ [],
+ with_tests=no
+ )
+
+ if test x"$with_tests" == xyes; then
+ AC_DEFINE(HAVE_TESTS, 1, [Build tests])
+ HAVE_TESTS=1
+ AC_SUBST(HAVE_TESTS)
+ fi
+ ])
+
diff --git a/server/configure.ac b/server/configure.ac
index d59d6fe2..1a40e2be 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -55,7 +55,9 @@ m4_include(ldap.m4)
m4_include(util/signal.m4)
PKG_CHECK_MODULES([DBUS],[dbus-1])
-PKG_CHECK_MODULES([CHECK],[check])
+if test xHAVE_TESTS != x; then
+ PKG_CHECK_MODULES([CHECK],[check])
+fi
PKG_CHECK_MODULES([NSS],[nss])
AC_SUBST(TESTS)
diff --git a/sssd.spec b/sssd.spec
index 7ad8e6a5..22c8d3ba 100644
--- a/sssd.spec
+++ b/sssd.spec
@@ -24,8 +24,6 @@ BuildRequires: libtdb-devel
BuildRequires: libldb-devel
BuildRequires: dbus-devel
BuildRequires: dbus-libs
-BuildRequires: check
-BuildRequires: check-devel
%description
Provides a set of daemons to manage access to remote directories and
@@ -44,6 +42,7 @@ cd server
./autogen.sh
%configure --prefix=%{_usr} \
--sysconfdir=%{_sysconfdir} \
+ --without-tests \
--without-policykit \
--with-infopipe