diff options
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | agent/Makefile.am | 4 | ||||
-rw-r--r-- | common/Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 26 | ||||
-rw-r--r-- | dirmngr/Makefile.am | 4 | ||||
-rw-r--r-- | g10/Makefile.am | 4 | ||||
-rw-r--r-- | g13/Makefile.am | 4 | ||||
-rw-r--r-- | sm/Makefile.am | 4 | ||||
-rw-r--r-- | tests/Makefile.am | 2 |
9 files changed, 57 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index d6e7b7dec..405d99d09 100644 --- a/Makefile.am +++ b/Makefile.am @@ -99,10 +99,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 64d308838..2688ba967 100644 --- a/agent/Makefile.am +++ b/agent/Makefile.am @@ -103,7 +103,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 65caae23a..11277ca20 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 9eb25bd02..47d52fbdc 100644 --- a/configure.ac +++ b/configure.ac @@ -1731,6 +1731,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". @@ -1791,6 +1801,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) @@ -2089,3 +2100,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 506a3f65d..77ca3f571 100644 --- a/dirmngr/Makefile.am +++ b/dirmngr/Makefile.am @@ -33,7 +33,11 @@ libexec_PROGRAMS = 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 c3f9d6f1e..e8e975342 100644 --- a/g10/Makefile.am +++ b/g10/Makefile.am @@ -54,7 +54,11 @@ endif #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/sm/Makefile.am b/sm/Makefile.am index 4931dabba..33426f5ef 100644 --- a/sm/Makefile.am +++ b/sm/Makefile.am @@ -22,7 +22,11 @@ EXTRA_DIST = ChangeLog-2011 gpgsm-w32info.rc bin_PROGRAMS = gpgsm noinst_PROGRAMS = $(module_tests) $(module_maint_tests) +if DISABLE_TESTS +TESTS = +else TESTS = $(module_tests) +endif AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS) diff --git a/tests/Makefile.am b/tests/Makefile.am index b9be6aaa6..b1138602b 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. |