commit 2407969d2ce852aaf2a25441a91fc8f8f475d880
parent f3fce53f399ad1032c9eeb9600c08fc0bf9f9fc2
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 3 Sep 2012 14:00:35 +0000
add option to disable running tests
Diffstat:
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
@@ -380,6 +380,18 @@ AC_CHECK_LIB(tidy, tidyInitSource,
LIBS=$LIBSOLD
+
+# should 'make check' run tests?
+AC_MSG_CHECKING(whether to run tests)
+AC_ARG_ENABLE([testruns],
+ [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])],
+ [enable_tests_run=${enableval}],
+ [enable_tests_run=yes])
+AC_MSG_RESULT($enable_test_run)
+AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
+
+
+
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
diff --git a/src/main/Makefile.am b/src/main/Makefile.am
@@ -101,7 +101,9 @@ check_PROGRAMS = \
test_gzip \
test_bzip2
+if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
+endif
test_trivial_SOURCES = \
test_trivial.c
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
@@ -221,10 +221,11 @@ check_PROGRAMS = \
$(TEST_TIFF) \
$(TEST_ZLIB)
+if ENABLE_TEST_RUN
TESTS = \
$(fuzz_tests) \
$(check_PROGRAMS)
-
+endif
noinst_LTLIBRARIES = \
libtest.la