aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--agent/Makefile.am4
-rw-r--r--common/Makefile.am4
-rw-r--r--configure.ac26
-rw-r--r--dirmngr/Makefile.am4
-rw-r--r--g10/Makefile.am4
-rw-r--r--g13/Makefile.am4
-rw-r--r--tests/Makefile.am2
8 files changed, 53 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index c4949aba5..d288e390d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,10 +100,15 @@ doc = doc
else
doc =
endif
+if DISABLE_TESTS
+tests =
+else
+tests = tests
+endif
SUBDIRS = m4 common regexp kbx \
${gpg} ${sm} ${agent} ${scd} ${g13} ${dirmngr} \
- tools po ${doc} tests
+ tools po ${doc} ${tests}
dist_doc_DATA = README
diff --git a/agent/Makefile.am b/agent/Makefile.am
index ce29462b2..11d542770 100644
--- a/agent/Makefile.am
+++ b/agent/Makefile.am
@@ -100,7 +100,11 @@ $(PROGRAMS): $(common_libs) $(commonpth_libs) $(pwquery_libs)
#
# Module tests
#
+if DISABLE_TESTS
+TESTS =
+else
TESTS = t-protect
+endif
t_common_ldadd = $(common_libs) $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \
$(LIBINTL) $(LIBICONV) $(NETLIBS)
diff --git a/common/Makefile.am b/common/Makefile.am
index 4d7f27514..97e30daff 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -28,7 +28,11 @@ if !HAVE_W32CE_SYSTEM
noinst_LIBRARIES += libsimple-pwquery.a
endif
noinst_PROGRAMS = $(module_tests) $(module_maint_tests)
+if DISABLE_TESTS
+TESTS =
+else
TESTS = $(module_tests)
+endif
BUILT_SOURCES = audit-events.h status-codes.h
diff --git a/configure.ac b/configure.ac
index 7bfeb1954..e2dcdfd11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1694,6 +1694,16 @@ if test "$run_all_tests" = "yes"; then
fi
#
+# Configure option --disable-tests
+#
+AC_MSG_CHECKING([whether tests should be run])
+AC_ARG_ENABLE(tests,
+ AC_HELP_STRING([--disable-tests],
+ [do not run any tests]),
+ run_tests=$enableval, run_tests=yes)
+AC_MSG_RESULT($run_tests)
+
+#
# We do not want support for the GNUPG_BUILDDIR environment variable
# in a released version. However, our regression tests suite requires
# this and thus we build with support for it during "make distcheck".
@@ -1753,6 +1763,7 @@ AM_CONDITIONAL(BUILD_SYMCRYPTRUN, test "$build_symcryptrun" = "yes")
AM_CONDITIONAL(BUILD_GPGTAR, test "$build_gpgtar" = "yes")
AM_CONDITIONAL(BUILD_WKS_TOOLS, test "$build_wks_tools" = "yes")
+AM_CONDITIONAL(DISABLE_TESTS, test "$run_tests" != yes)
AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
AM_CONDITIONAL(NO_TRUST_MODELS, test "$use_trust_models" = no)
AM_CONDITIONAL(USE_TOFU, test "$use_tofu" = yes)
@@ -2041,3 +2052,18 @@ cat <<G10EOF
G10EOF
fi
+if test "${build_gpg}" != "yes"; then
+cat <<G10EOF
+ Warning: The component "gpg" is used by other components as
+ well as for the test suite. You have disabled
+ this component and thus other things won't work.
+
+G10EOF
+fi
+if test "${run_tests}" != "yes"; then
+cat <<G10EOF
+ Warning: The use of the test suite has been disabled!
+ This is in almost all cases a bad idea. Take care.
+
+G10EOF
+fi
diff --git a/dirmngr/Makefile.am b/dirmngr/Makefile.am
index 2bf0cb75b..208a81335 100644
--- a/dirmngr/Makefile.am
+++ b/dirmngr/Makefile.am
@@ -31,7 +31,11 @@ libexec_PROGRAMS = dirmngr_ldap
endif
noinst_PROGRAMS = $(module_tests) $(module_net_tests) $(module_maint_tests)
+if DISABLE_TESTS
+TESTS =
+else
TESTS = $(module_tests) $(module_net_tests)
+endif
AM_CPPFLAGS =
diff --git a/g10/Makefile.am b/g10/Makefile.am
index 693284c6d..9cecc17b2 100644
--- a/g10/Makefile.am
+++ b/g10/Makefile.am
@@ -54,7 +54,11 @@ if MAINTAINER_MODE
noinst_PROGRAMS += gpgcompose
endif
noinst_PROGRAMS += $(module_tests)
+if DISABLE_TESTS
+TESTS =
+else
TESTS = $(module_tests)
+endif
TESTS_ENVIRONMENT = \
abs_top_srcdir=$(abs_top_srcdir)
diff --git a/g13/Makefile.am b/g13/Makefile.am
index 1aac1b379..ef5671f21 100644
--- a/g13/Makefile.am
+++ b/g13/Makefile.am
@@ -24,7 +24,11 @@ bin_PROGRAMS = g13
sbin_PROGRAMS = g13-syshelp
noinst_PROGRAMS = $(module_tests)
+if DISABLE_TESTS
+TESTS =
+else
TESTS = $(module_tests)
+endif
AM_CPPFLAGS =
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6bb1b2350..65978ae3f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,4 @@
-# Makefile.am -tests makefile for libxtime
+# Makefile.am
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# This file is part of GnuPG.