summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.am22
-rw-r--r--server/conf_macros.m418
-rw-r--r--server/configure.ac14
3 files changed, 22 insertions, 32 deletions
diff --git a/server/Makefile.am b/server/Makefile.am
index 7ef7eb7b..6aa6bec7 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -49,13 +49,18 @@ sssdlibexec_PROGRAMS = \
$(sssd_pk) \
$(sssd_info)
-if BUILD_TESTS
+if HAVE_CHECK
+ non_interactive_check_based_tests = \
+ sysdb-tests \
+ resolv-tests
+endif
+
check_PROGRAMS = \
- sysdb-tests \
stress-tests \
- resolv-tests
-TESTS = sysdb-tests resolv-tests
-endif
+ $(non_interactive_check_based_tests)
+
+TESTS = \
+ $(non_interactive_check_based_tests)
sssdlib_LTLIBRARIES = \
libsss_ldap.la \
@@ -322,7 +327,7 @@ sss_groupmod_LDADD = \
#################
# Feature Tests #
#################
-if BUILD_TESTS
+if HAVE_CHECK
sysdb_tests_SOURCES = \
tests/sysdb-tests.c \
$(SSSD_UTIL_OBJ)
@@ -331,6 +336,7 @@ sysdb_tests_CFLAGS = \
sysdb_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS)
+endif
stress_tests_SOURCES = \
tests/stress-tests.c \
@@ -338,6 +344,7 @@ stress_tests_SOURCES = \
stress_tests_LDADD = \
$(SSSD_LIBS)
+if HAVE_CHECK
resolv_tests_SOURCES = \
tests/resolv-tests.c \
$(SSSD_UTIL_OBJ) \
@@ -348,8 +355,7 @@ resolv_tests_LDADD = \
$(SSSD_LIBS) \
$(CHECK_LIBS) \
$(CARES_LIBS)
-
-endif #BUILD_TESTS
+endif
####################
# Plugin Libraries #
diff --git a/server/conf_macros.m4 b/server/conf_macros.m4
index 2613bfb3..aa2d578f 100644
--- a/server/conf_macros.m4
+++ b/server/conf_macros.m4
@@ -66,24 +66,6 @@ AC_DEFUN([WITH_PIPE_PATH],
AC_DEFINE_UNQUOTED(PIPE_PATH, "$config_pipepath", [Where to store pipe files for the SSSD interconnects])
])
-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
- ])
-AM_CONDITIONAL([BUILD_TESTS], [test x$with_tests = xyes])
-
AC_DEFUN([WITH_INIT_DIR],
[ AC_ARG_WITH([init-dir],
[AC_HELP_STRING([--with-init-dir=DIR],
diff --git a/server/configure.ac b/server/configure.ac
index 9cd30e20..f186ede0 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -15,7 +15,7 @@ AC_INIT([sss_daemon], [0.4.0], [freeipa-devel@redhat.com])
AC_CONFIG_SRCDIR([conf_macros.m4])
AC_CONFIG_AUX_DIR([build])
-AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
+AM_INIT_AUTOMAKE([-Wall foreign subdir-objects color-tests])
AM_PROG_CC_C_O
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
@@ -39,7 +39,6 @@ WITH_DB_PATH
WITH_PLUGIN_PATH
WITH_PID_PATH
WITH_PIPE_PATH
-WITH_TESTS
WITH_INIT_DIR
WITH_SHADOW_UTILS_PATH
WITH_MANPAGES
@@ -67,9 +66,7 @@ if test x$has_dbus != xno; then
AC_DEFINE([HAVE_DBUS_WATCH_GET_UNIX_FD], [1],
[Define if dbus_watch_get_unix_fd exists]))
fi
-if test x$HAVE_TESTS != x; then
- PKG_CHECK_MODULES([CHECK],[check])
-fi
+
PKG_CHECK_MODULES([NSS],[nss])
if test x$HAVE_MANPAGES != x; then
@@ -81,6 +78,11 @@ fi
AC_CHECK_HEADERS([sys/inotify.h])
-AC_CONFIG_FILES([Makefile po/Makefile.in])
+PKG_CHECK_MODULES([CHECK], [check], [have_check=1], [have_check=])
+if test x$have_check = x; then
+ AC_MSG_WARN([Without the 'CHECK' libraries, you will be unable to run all tests in the 'make check' suite])
+fi
+AM_CONDITIONAL([HAVE_CHECK], [test x$have_check != x])
+AC_CONFIG_FILES([Makefile po/Makefile.in])
AC_OUTPUT