]> granicus.if.org Git - neomutt/commitdiff
build: disable testing by default 1694/head
authorRichard Russon <rich@flatcap.org>
Thu, 2 May 2019 13:06:07 +0000 (14:06 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 2 May 2019 15:55:54 +0000 (16:55 +0100)
Change `configure` to not build the unit tests by default.

```
--testing   Enable Unit Testing
--coverage  Enable Coverage Testing (enables Unit Testing)
```

Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
Makefile.autosetup
auto.def

index d3349834b75c65c98a39785ea87be81320705bdb..e01d2b22e0ca96dd3f1f13c16f5202b5a740e3b6 100644 (file)
@@ -443,12 +443,14 @@ distclean: clean
        $(RM) *.gc?? */*.gc?? test/*/*.gc??
        $(RM) lcov.info lcov
 
+@if ENABLE_COVERAGE
 # coverage testing
 coverage: all test
        $(RM) lcov
        lcov -t "test" -o lcov.info -c -d address -d config -d email -d mutt
        -genhtml -o lcov lcov.info -f
        lcov -l lcov.info
+@endif
 
 ##############################################################################
 # include generated dependency files
@@ -460,6 +462,8 @@ coverage: all test
 include po/Makefile
 include contrib/Makefile
 include doc/Makefile
+@if ENABLE_UNIT_TESTS
 include test/Makefile
+@endif
 
 # vim: set ts=8 noexpandtab:
index f54b05f2cf46b5ce923b145c9b44d9a3593af364..5988a95716bcec309a90ec67757487ab9fc19160 100644 (file)
--- a/auto.def
+++ b/auto.def
@@ -18,7 +18,7 @@ define PACKAGE_VERSION  "20180716"
 define BUGS_ADDRESS     "neomutt-devel@neomutt.org"
 
 # Subdirectories that contain additional Makefile.autosetup files
-set subdirs {po doc contrib test}
+set subdirs {po doc contrib}
 ###############################################################################
 
 ###############################################################################
@@ -89,8 +89,9 @@ options {
   with-tokyocabinet:path    => "Location of TokyoCabinet"
 # System
   with-sysroot:path         => "Target system root"
-# Coverage testing
-  lcov=0                    => "Enable Coverage Testing"
+# Testing
+  testing=0                 => "Enable Unit Testing"
+  coverage=0                => "Enable Coverage Testing"
 # Enable all options
   everything=0              => "Enable all options"
 }
@@ -103,9 +104,9 @@ options {
 if {1} {
   # Keep sorted, please.
   foreach opt {
-    bdb doc everything fmemopen full-doc gdbm gnutls gpgme gss
-    homespool idn idn2 inotify kyotocabinet lcov lmdb locales-fix lua mixmaster nls
-    notmuch pgp qdbm sasl smime ssl tokyocabinet
+    bdb coverage doc everything fmemopen full-doc gdbm gnutls gpgme gss
+    homespool idn idn2 inotify kyotocabinet lmdb locales-fix lua mixmaster nls
+    notmuch pgp qdbm sasl smime ssl testing tokyocabinet
   } {
     define want-$opt [opt-bool $opt]
   }
@@ -451,11 +452,19 @@ if {[get-define want-sasl]} {
 
 ###############################################################################
 # Coverage Testing
-if {[get-define want-lcov]} {
+if {[get-define want-coverage]} {
+  define ENABLE_COVERAGE
   define-append CFLAGS -fprofile-arcs -ftest-coverage
   define-append LDFLAGS -fprofile-arcs -ftest-coverage
 }
 
+###############################################################################
+# Unit Testing
+if {[get-define want-testing]} {
+  define ENABLE_UNIT_TESTS
+  lappend subdirs test
+}
+
 ###############################################################################
 # Lua
 if {[get-define want-lua]} {