From: Timo Sirainen Date: Wed, 5 Nov 2025 10:50:46 +0000 (+0200) Subject: global: Move most unit test runs to Makefile.test.include X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dbb323cfde37fc994c5e16149075a369c9bbbb9;p=thirdparty%2Fdovecot%2Fcore.git global: Move most unit test runs to Makefile.test.include The special cases are changed by the next commit. --- diff --git a/Makefile.test.include b/Makefile.test.include new file mode 100644 index 0000000000..8d1b71c423 --- /dev/null +++ b/Makefile.test.include @@ -0,0 +1,6 @@ +noinst_PROGRAMS = $(test_programs) + +check-local: + for bin in $(test_programs); do \ + if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ + done diff --git a/src/anvil/Makefile.am b/src/anvil/Makefile.am index 54d5b1db05..42edeca732 100644 --- a/src/anvil/Makefile.am +++ b/src/anvil/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkglibexecdir = $(libexecdir)/dovecot pkglibexec_PROGRAMS = anvil @@ -38,8 +40,6 @@ test_programs = \ test-connect-limit \ test-penalty -noinst_PROGRAMS = $(test_programs) - test_libs = \ ../lib-test/libtest.la \ ../lib/liblib.la @@ -51,8 +51,3 @@ test_connect_limit_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(test_libs) test_penalty_SOURCES = test-penalty.c test_penalty_LDADD = penalty.o $(test_libs) test_penalty_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(test_libs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/auth/Makefile.am b/src/auth/Makefile.am index e9dff950d6..9b9bbdec16 100644 --- a/src/auth/Makefile.am +++ b/src/auth/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + auth_moduledir = $(moduledir)/auth # automake seems to force making this unconditional.. @@ -221,8 +223,6 @@ test_programs = \ test-auth \ test-mech -noinst_PROGRAMS = $(test_programs) - noinst_HEADERS = test-auth.h db-lua.h test-auth-master.h test_auth_cache_SOURCES = auth-cache.c test-auth-cache.c @@ -270,9 +270,3 @@ test_auth_master_SOURCES = \ test_auth_master_LDADD = $(LIBDOVECOT) $(auth_libs) $(AUTH_LIBS) $(LUA_LIBS) test_auth_master_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(LIBDOVECOT_DEPS) - - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/config/Makefile.am b/src/config/Makefile.am index efedcb93ca..025ba04aa5 100644 --- a/src/config/Makefile.am +++ b/src/config/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkgsysconfdir = $(sysconfdir)/dovecot pkglibexecdir = $(libexecdir)/dovecot exampledir = $(docdir)/example-config @@ -96,8 +98,6 @@ EXTRA_DIST = \ test_programs = \ test-config-parser -noinst_PROGRAMS = $(test_programs) - test_libs = \ $(noinst_LTLIBRARIES) \ $(LIBDOVECOT) @@ -106,8 +106,3 @@ test_config_parser_CFLAGS = $(AM_CFLAGS) test_config_parser_SOURCES = test-config-parser.c test_config_parser_LDADD = $(test_libs) test_config_parser_DEPENDENCIES = $(LIBDOVECOT_DEPS) $(noinst_LTLIBRARIES) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/doveadm/Makefile.am b/src/doveadm/Makefile.am index f4c8434ceb..b89b88d60c 100644 --- a/src/doveadm/Makefile.am +++ b/src/doveadm/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + doveadm_moduledir = $(moduledir)/doveadm pkglibexecdir = $(libexecdir)/dovecot @@ -193,7 +195,6 @@ noinst_HEADERS = \ test_programs = \ test-doveadm-cmd \ test-doveadm-util -noinst_PROGRAMS = $(test_programs) test_libs = $(LIBDOVECOT) test_deps = $(noinst_LTLIBRARIES) $(LIBDOVECOT_DEPS) @@ -205,8 +206,3 @@ test_doveadm_cmd_DEPENDENCIES = $(test_deps) test_doveadm_util_SOURCES = doveadm-util.c test-doveadm-util.c test_doveadm_util_LDADD = $(test_libs) $(MODULE_LIBS) test_doveadm_util_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/doveadm/dsync/Makefile.am b/src/doveadm/dsync/Makefile.am index 3e65e88f28..17ddab85fe 100644 --- a/src/doveadm/dsync/Makefile.am +++ b/src/doveadm/dsync/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkglib_LTLIBRARIES = libdovecot-dsync.la noinst_LTLIBRARIES = libdsync.la @@ -61,8 +63,6 @@ noinst_HEADERS = \ test_programs = \ test-dsync-mailbox-tree-sync -noinst_PROGRAMS = $(test_programs) - test_libs = \ ../../lib-test/libtest.la \ ../../lib/liblib.la @@ -70,8 +70,3 @@ test_libs = \ test_dsync_mailbox_tree_sync_SOURCES = test-dsync-mailbox-tree-sync.c test_dsync_mailbox_tree_sync_LDADD = dsync-mailbox-tree-sync.lo dsync-mailbox-tree.lo $(test_libs) test_dsync_mailbox_tree_sync_DEPENDENCIES = $(pkglib_LTLIBRARIES) $(test_libs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/imap/Makefile.am b/src/imap/Makefile.am index b3a2f10318..33bf5443ee 100644 --- a/src/imap/Makefile.am +++ b/src/imap/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkglibexecdir = $(libexecdir)/dovecot pkglibexec_PROGRAMS = imap @@ -127,7 +129,6 @@ endif test_programs = \ test-imap-storage-callbacks \ $(TEST_IMAP_CLIENT_HIBERNATE) -noinst_PROGRAMS = $(test_programs) test_imap_storage_callbacks_SOURCES = \ test-imap-storage-callbacks.c \ @@ -139,8 +140,3 @@ test_imap_client_hibernate_SOURCES = \ test-imap-client-hibernate.c $(common_sources) test_imap_client_hibernate_LDADD = $(imap_LDADD) test_imap_client_hibernate_DEPENDENCIES = $(imap_DEPENDENCIES) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/indexer/Makefile.am b/src/indexer/Makefile.am index cd264320da..680934b25c 100644 --- a/src/indexer/Makefile.am +++ b/src/indexer/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkglibexecdir = $(libexecdir)/dovecot pkglibexec_PROGRAMS = indexer indexer-worker @@ -49,8 +51,6 @@ noinst_HEADERS = \ test_programs = \ test-indexer-queue -noinst_PROGRAMS = $(test_programs) - test_libs = \ ../lib-test/libtest.la \ ../lib/liblib.la @@ -58,8 +58,3 @@ test_libs = \ test_indexer_queue_SOURCES = test-indexer-queue.c indexer-queue.c test_indexer_queue_LDADD = $(test_libs) test_indexer_queue_DEPENDENCIES = $(pkglibexec_PROGRAMS) $(test_libs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-auth-client/Makefile.am b/src/lib-auth-client/Makefile.am index 177b0b623f..76f09e47e5 100644 --- a/src/lib-auth-client/Makefile.am +++ b/src/lib-auth-client/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libauth-client.la AM_CPPFLAGS = \ @@ -32,8 +34,6 @@ test_programs = \ test-auth-client \ test-auth-master -noinst_PROGRAMS = $(test_programs) - test_libs = \ $(noinst_LTLIBRARIES) \ ../lib-master/libmaster.la \ @@ -61,8 +61,3 @@ test_auth_master_DEPENDENCIES = $(test_deps) test_auth_client_SOURCES = test-auth-client.c test_auth_client_LDADD = $(test_libs) test_auth_client_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-auth/Makefile.am b/src/lib-auth/Makefile.am index fefb78448a..9f52e7e96b 100644 --- a/src/lib-auth/Makefile.am +++ b/src/lib-auth/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libauth-crypt.la libauth.la if HAVE_GSSAPI noinst_LTLIBRARIES += libauth-gssapi.la @@ -55,8 +57,6 @@ test_programs = \ test-auth-gs2 \ test-auth-scram -noinst_PROGRAMS = $(test_programs) - test_libs = \ $(noinst_LTLIBRARIES) \ ../lib-otp/libotp.la \ @@ -97,8 +97,3 @@ test_auth_scram_LDADD = \ ../lib-otp/libotp.la test_auth_scram_DEPENDENCIES = \ $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-charset/Makefile.am b/src/lib-charset/Makefile.am index dd0b7b9283..eec2a189b4 100644 --- a/src/lib-charset/Makefile.am +++ b/src/lib-charset/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libcharset.la AM_CPPFLAGS = \ @@ -18,8 +20,6 @@ pkginc_lib_HEADERS = $(headers) test_programs = \ test-charset -noinst_PROGRAMS = $(test_programs) - test_libs = \ ../lib-test/libtest.la \ ../lib/liblib.la @@ -28,8 +28,3 @@ test_deps = $(noinst_LTLIBRARIES) $(test_libs) test_charset_SOURCES = test-charset.c test_charset_LDADD = libcharset.la $(test_libs) test_charset_DEPENDENCIES = libcharset.la $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-compression/Makefile.am b/src/lib-compression/Makefile.am index 21de471336..fd36d35792 100644 --- a/src/lib-compression/Makefile.am +++ b/src/lib-compression/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libcompression.la AM_CPPFLAGS = \ @@ -40,7 +42,7 @@ libdovecot_compression_la_LDFLAGS = -export-dynamic test_programs = \ test-compression -noinst_PROGRAMS = $(test_programs) bench-compression +noinst_PROGRAMS += bench-compression test_libs = \ $(noinst_LTLIBRARIES) \ @@ -55,8 +57,3 @@ test_compression_DEPENDENCIES = $(test_deps) bench_compression_SOURCES = bench-compression.c bench_compression_LDADD = $(test_libs) bench_compression_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-dcrypt/Makefile.am b/src/lib-dcrypt/Makefile.am index 294730a0b4..53cb67cd29 100644 --- a/src/lib-dcrypt/Makefile.am +++ b/src/lib-dcrypt/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libdcrypt.la libdcrypt_openssl_static.la module_LTLIBRARIES = @@ -47,12 +49,6 @@ EXTRA_DIST = \ sample-v2.asc test_programs = test-crypto test-stream -noinst_PROGRAMS = $(test_programs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done LIBDOVECOT_TEST_DEPS = \ ../lib-var-expand/libvar_expand.la \ diff --git a/src/lib-dict-backend/Makefile.am b/src/lib-dict-backend/Makefile.am index b8be1434d2..68f744b449 100644 --- a/src/lib-dict-backend/Makefile.am +++ b/src/lib-dict-backend/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libdict_backend.la module_dictdir = $(moduledir)/dict @@ -95,8 +97,6 @@ dict-drivers-register.c: Makefile $(top_builddir)/config.h test_programs = \ test-dict-sql -noinst_PROGRAMS = $(test_programs) - test_dict_sql_CFLAGS = $(AM_CFLAGS) -DDICT_SRC_DIR=\"$(top_srcdir)/src/lib-dict-backend\" test_dict_sql_SOURCES = \ test-dict-sql.c @@ -111,8 +111,3 @@ test_dict_sql_DEPENDENCIES = \ ../lib-sql/libdriver_test.la \ ../lib-sql/libsql.la \ $(LIBDOVECOT_DEPS) - -check-local: - for bin in $(test_programs) $(check_PROGRAMS); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-dict-extra/Makefile.am b/src/lib-dict-extra/Makefile.am index e7b783109a..deaba460d5 100644 --- a/src/lib-dict-extra/Makefile.am +++ b/src/lib-dict-extra/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libdict_extra.la dict_drivers = @dict_drivers@ @@ -25,8 +27,6 @@ NOPLUGIN_LDFLAGS = test_programs = \ test-dict-fs -noinst_PROGRAMS = $(test_programs) - test_libs = \ ../lib-master/libmaster.la \ ../lib-ssl-iostream/libssl_iostream.la \ @@ -41,8 +41,3 @@ test_libs = \ test_dict_fs_SOURCES = test-dict-fs.c test_dict_fs_LDADD = $(noinst_LTLIBRARIES) ../lib-fs/libfs.la $(test_libs) $(MODULE_LIBS) test_dict_fs_DEPENDENCIES = $(noinst_LTLIBRARIES) ../lib-fs/libfs.la $(test_libs) - -check-local: - for bin in $(test_programs) $(check_PROGRAMS); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-dict/Makefile.am b/src/lib-dict/Makefile.am index 68539db32f..a54aab216f 100644 --- a/src/lib-dict/Makefile.am +++ b/src/lib-dict/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = \ libdict.la @@ -50,8 +52,6 @@ pkginc_lib_HEADERS = $(headers) test_programs = \ test-dict -noinst_PROGRAMS = $(test_programs) - test_libs = \ libdict.la \ ../lib-settings/libsettings.la \ @@ -64,8 +64,3 @@ test_libs = \ test_dict_SOURCES = test-dict.c test_dict_LDADD = $(test_libs) $(DLLIB) test_dict_DEPENDENCIES = $(test_libs) - -check-local: - for bin in $(test_programs) $(check_PROGRAMS); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-dns-client/Makefile.am b/src/lib-dns-client/Makefile.am index 2e882d80ab..d57003a6f6 100644 --- a/src/lib-dns-client/Makefile.am +++ b/src/lib-dns-client/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libdns-client.la AM_CPPFLAGS = \ @@ -19,8 +21,6 @@ headers = \ test_programs = \ test-dns-lookup -noinst_PROGRAMS = $(test_programs) - test_libs = \ libdns-client.la \ ../lib-settings/libsettings.la \ @@ -33,12 +33,6 @@ test_libs = \ test_dns_lookup_SOURCES = test-dns-lookup.c test_dns_lookup_LDADD = $(test_libs) $(DLLIB) -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - - pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) diff --git a/src/lib-dns/Makefile.am b/src/lib-dns/Makefile.am index fca2dccc71..386f3f3320 100644 --- a/src/lib-dns/Makefile.am +++ b/src/lib-dns/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libdns.la AM_CPPFLAGS = \ @@ -13,8 +15,6 @@ headers = \ test_programs = \ test-dns-util -noinst_PROGRAMS = $(test_programs) - test_libs = \ libdns.la \ ../lib-test/libtest.la \ @@ -23,11 +23,5 @@ test_libs = \ test_dns_util_SOURCES = test-dns-util.c test_dns_util_LDADD = $(test_libs) -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - - pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) diff --git a/src/lib-fs/Makefile.am b/src/lib-fs/Makefile.am index dc129f32bf..71527893a9 100644 --- a/src/lib-fs/Makefile.am +++ b/src/lib-fs/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libfs.la AM_CPPFLAGS = \ @@ -42,8 +44,6 @@ headers = \ pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) -noinst_PROGRAMS = $(test_programs) - test_programs = \ test-fs-metawrap \ test-fs-posix @@ -69,8 +69,3 @@ test_fs_metawrap_DEPENDENCIES = $(test_deps) test_fs_posix_SOURCES = test-fs-posix.c test_fs_posix_LDADD = $(test_libs) test_fs_posix_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-http/Makefile.am b/src/lib-http/Makefile.am index 0d4328b0bf..fb7265561d 100644 --- a/src/lib-http/Makefile.am +++ b/src/lib-http/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libhttp.la AM_CPPFLAGS = \ @@ -77,7 +79,7 @@ test_nocheck_programs = \ test-http-client \ test-http-server -noinst_PROGRAMS = $(test_programs) $(test_nocheck_programs) +noinst_PROGRAMS += $(test_nocheck_programs) test_libs = \ ../lib-settings/libsettings.la \ @@ -213,8 +215,3 @@ test_http_server_errors_LDADD = \ $(test_http_libs) test_http_server_errors_DEPENDENCIES = \ $(test_http_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-imap-client/Makefile.am b/src/lib-imap-client/Makefile.am index c54f8df713..64fb1510dc 100644 --- a/src/lib-imap-client/Makefile.am +++ b/src/lib-imap-client/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libimap_client.la AM_CPPFLAGS = \ @@ -30,8 +32,6 @@ pkginc_lib_HEADERS = $(headers) test_programs = \ test-imapc-client -noinst_PROGRAMS = $(test_programs) - test_deps = \ $(noinst_LTLIBRARIES) \ ../lib-dovecot/libdovecot.la @@ -43,8 +43,3 @@ test_libs = \ test_imapc_client_SOURCES = test-imapc-client.c test_imapc_client_LDADD = $(test_libs) test_imapc_client_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-imap/Makefile.am b/src/lib-imap/Makefile.am index c3d5540a9e..5bf88ab402 100644 --- a/src/lib-imap/Makefile.am +++ b/src/lib-imap/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libimap.la AM_CPPFLAGS = \ @@ -54,8 +56,6 @@ test_programs = \ test-imap-utf7 \ test-imap-util -noinst_PROGRAMS = $(test_programs) - test_libs = \ ../lib-charset/libcharset.la \ ../lib-test/libtest.la \ @@ -99,11 +99,6 @@ test_imap_util_SOURCES = test-imap-util.c test_imap_util_LDADD = imap-util.lo imap-arg.lo $(test_libs) test_imap_util_DEPENDENCIES = $(test_deps) -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - if USE_FUZZER noinst_PROGRAMS += \ fuzz-imap-utf7 \ diff --git a/src/lib-index/Makefile.am b/src/lib-index/Makefile.am index a4af01715b..5ef86d1c89 100644 --- a/src/lib-index/Makefile.am +++ b/src/lib-index/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libindex.la AM_CPPFLAGS = \ @@ -76,8 +78,6 @@ test_programs = \ test-mail-transaction-log-file \ test-mail-transaction-log-view -noinst_PROGRAMS = $(test_programs) - test_libs = \ ../lib-test/libtest.la \ ../lib/liblib.la @@ -140,11 +140,6 @@ test_mail_transaction_log_view_SOURCES = test-mail-transaction-log-view.c test_mail_transaction_log_view_LDADD = mail-transaction-log-view.lo $(test_minimal_libs) test_mail_transaction_log_view_DEPENDENCIES = $(test_deps) -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) diff --git a/src/lib-json/Makefile.am b/src/lib-json/Makefile.am index d0c1ce6437..6fab5acc23 100644 --- a/src/lib-json/Makefile.am +++ b/src/lib-json/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libjson.la AM_CPPFLAGS = \ @@ -43,7 +45,7 @@ fuzz_programs += \ fuzz-json-istream endif -noinst_PROGRAMS = json-format $(test_programs) $(fuzz_programs) +noinst_PROGRAMS += json-format $(fuzz_programs) json_format_SOURCE = \ json-format.c @@ -128,9 +130,3 @@ fuzz_json_istream_LDADD = \ $(test_libs) fuzz_json_istream_DEPENDENCIES = \ $(test_deps) - -check: check-am check-test -check-test: all-am - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-language/Makefile.am b/src/lib-language/Makefile.am index 49d3b6db70..945a96be11 100644 --- a/src/lib-language/Makefile.am +++ b/src/lib-language/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = liblanguage.la AM_CPPFLAGS = \ @@ -102,8 +104,6 @@ test_programs = \ test-lang-filter \ test-lang-tokenizer -noinst_PROGRAMS = $(test_programs) - test_libs = ../lib-dovecot/libdovecot.la test_deps = $(noinst_LTLIBRARIES) $(test_libs) @@ -125,8 +125,3 @@ endif test_lang_tokenizer_SOURCES = test-lang-tokenizer.c test_lang_tokenizer_LDADD = liblanguage.la $(test_libs) test_lang_tokenizer_DEPENDENCIES = liblanguage.la $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-ldap/Makefile.am b/src/lib-ldap/Makefile.am index c866896b73..7888cdd96d 100644 --- a/src/lib-ldap/Makefile.am +++ b/src/lib-ldap/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libdldap.la AM_CPPFLAGS = \ @@ -47,8 +49,3 @@ test_libs = \ ../lib-test/libtest.la \ ../lib-var-expand/libvar_expand.la \ ../lib/liblib.la - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-login/Makefile.am b/src/lib-login/Makefile.am index a92f657868..70b530e43d 100644 --- a/src/lib-login/Makefile.am +++ b/src/lib-login/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkgsysconfdir = $(sysconfdir)/dovecot noinst_LTLIBRARIES = liblogin.la @@ -26,8 +28,6 @@ pkginc_lib_HEADERS = $(headers) test_programs = \ test-login-server-auth -noinst_PROGRAMS = $(test_programs) - test_libs = \ liblogin.la \ ../lib-master/libmaster.la \ @@ -60,8 +60,3 @@ test_deps = \ test_login_server_auth_SOURCES = test-login-server-auth.c test_login_server_auth_LDADD = $(test_libs) test_login_server_auth_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-lua/Makefile.am b/src/lib-lua/Makefile.am index f6c44e09a9..3819573fd0 100644 --- a/src/lib-lua/Makefile.am +++ b/src/lib-lua/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-test \ @@ -66,8 +68,6 @@ EXTRA_DIST = \ test-io-lua.lua \ test-lua-base64.lua -noinst_PROGRAMS = $(test_programs) - test_libs_ssl = ../lib-ssl-iostream/libssl_iostream_openssl.la test_lua_SOURCES = test-lua.c @@ -95,8 +95,3 @@ test_lua_http_client_LDADD = libdlua.la $(LIBDOVECOT) $(test_libs_ssl) $(LUA_LIB test_lua_http_client_DEPENDENCIES = libdlua.la $(LIBDOVECOT_DEPS) test_lua_http_client_CFLAGS = $(AM_CFLAGS) \ -DTEST_LUA_SCRIPT_DIR=\"$(abs_srcdir)\" - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-mail/Makefile.am b/src/lib-mail/Makefile.am index 60a550c0a7..a55d48f044 100644 --- a/src/lib-mail/Makefile.am +++ b/src/lib-mail/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libmail.la AM_CPPFLAGS = \ @@ -126,7 +128,7 @@ fuzz_message_parser_DEPENDENCIES = $(test_deps) endif -noinst_PROGRAMS = $(fuzz_programs) $(test_programs) +noinst_PROGRAMS += $(fuzz_programs) test_libs = \ $(noinst_LTLIBRARIES) \ @@ -251,8 +253,3 @@ test_rfc822_parser_DEPENDENCIES = $(test_deps) test_message_part_serialize_SOURCES = test-message-part-serialize.c test_message_part_serialize_LDADD = $(test_libs) test_message_part_serialize_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-master/Makefile.am b/src/lib-master/Makefile.am index bfead4f0dd..3c11d83c98 100644 --- a/src/lib-master/Makefile.am +++ b/src/lib-master/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkgsysconfdir = $(sysconfdir)/dovecot noinst_LTLIBRARIES = libmaster.la @@ -48,8 +50,6 @@ test_programs = \ test-event-stats \ test-master-service-settings -noinst_PROGRAMS = $(test_programs) - test_deps = \ libmaster.la \ ../lib-ssl-iostream/libssl_iostream.la \ @@ -73,8 +73,3 @@ test_event_stats_DEPENDENCIES = $(test_deps) test_master_service_settings_SOURCES = test-master-service-settings.c test_master_service_settings_LDADD = $(test_libs) test_master_service_settings_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-oauth2/Makefile.am b/src/lib-oauth2/Makefile.am index f5172198aa..fe6bfd88c2 100644 --- a/src/lib-oauth2/Makefile.am +++ b/src/lib-oauth2/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-test \ @@ -30,8 +32,6 @@ test_programs = \ test-oauth2-json \ test-oauth2-jwt -noinst_PROGRAMS = $(test_programs) - test_libs = \ $(noinst_LTLIBRARIES) \ ../lib-dcrypt/libdcrypt_openssl_static.la \ @@ -81,8 +81,3 @@ test_oauth2_jwt_LDFLAGS = \ -Wl,$(LD_WHOLE_ARCHIVE),../lib-json/.libs/libjson.a,../lib-ssl-iostream/.libs/libssl_iostream.a,$(LD_NO_WHOLE_ARCHIVE) endif test_oauth2_jwt_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-regex/Makefile.am b/src/lib-regex/Makefile.am index 9d26d27fa1..302ca11302 100644 --- a/src/lib-regex/Makefile.am +++ b/src/lib-regex/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-test \ @@ -27,8 +29,6 @@ EXTRA_DIST = test_programs = test-regex -noinst_PROGRAMS = $(test_programs) - test_regex_SOURCES = test-regex.c test_regex_LDADD = libdregex.la \ ../lib-test/libtest.la \ @@ -36,12 +36,6 @@ test_regex_LDADD = libdregex.la \ $(LIBPCRE_LIBS) test_regex_DEPENDENCIES = libdregex.la -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - - else libdregex_la_SOURCES = empty.c endif diff --git a/src/lib-sasl/Makefile.am b/src/lib-sasl/Makefile.am index 70d9765d38..734589cc46 100644 --- a/src/lib-sasl/Makefile.am +++ b/src/lib-sasl/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libsasl.la if HAVE_GSSAPI noinst_LTLIBRARIES += libsasl-gssapi.la @@ -92,7 +94,7 @@ fuzz_programs += \ fuzz-sasl-authentication endif -noinst_PROGRAMS = $(test_programs) ntlm_dummy $(fuzz_programs) +noinst_PROGRAMS += ntlm_dummy $(fuzz_programs) test_libs = \ libsasl.la \ @@ -154,8 +156,3 @@ fuzz_sasl_authentication_LDADD += \ fuzz_sasl_authentication_DEPENDENCIES += \ ../lib-auth/libauth-gssapi.la endif - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-settings/Makefile.am b/src/lib-settings/Makefile.am index 0a0f5ab562..c17fead869 100644 --- a/src/lib-settings/Makefile.am +++ b/src/lib-settings/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libsettings.la AM_CPPFLAGS = \ @@ -39,8 +41,6 @@ test_programs = \ test-settings-parser \ test-settings -noinst_PROGRAMS = $(test_programs) - test_libs = \ libsettings.la \ ../lib-var-expand/libvar_expand.la \ @@ -56,8 +56,3 @@ test_settings_parser_DEPENDENCIES = $(test_libs) test_settings_SOURCES = test-settings.c test_settings_LDADD = $(test_libs) $(DLLIB) test_settings_DEPENDENCIES = $(test_libs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-sql/Makefile.am b/src/lib-sql/Makefile.am index 3dd05f8cce..f7c2678948 100644 --- a/src/lib-sql/Makefile.am +++ b/src/lib-sql/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libdriver_test.la libsql.la SQL_DRIVER_PLUGINS = @@ -158,10 +160,3 @@ test_sql_sqlite_SOURCES = test-sql-sqlite.c test_sql_sqlite_LDADD = $(SQLITE_LIB) $(pkglib_LTLIBRARIES) $(test_libs) $(DLLIB) test_sql_sqlite_DEPENDENCIES = $(SQLITE_LIB) $(pkglib_LTLIBRARIES) $(test_libs) endif - -noinst_PROGRAMS = $(test_programs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-ssl-iostream/Makefile.am b/src/lib-ssl-iostream/Makefile.am index b1c680e77e..a6e8ad22ae 100644 --- a/src/lib-ssl-iostream/Makefile.am +++ b/src/lib-ssl-iostream/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libssl_iostream.la NOPLUGIN_LDFLAGS = @@ -57,10 +59,3 @@ test_iostream_ssl_DEPENDENCIES = $(test_libs) test_programs = \ test-iostream-ssl - -noinst_PROGRAMS = $(test_programs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-storage/Makefile.am b/src/lib-storage/Makefile.am index f569eb7f78..7f5e58615d 100644 --- a/src/lib-storage/Makefile.am +++ b/src/lib-storage/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + SUBDIRS = list index noinst_LTLIBRARIES = libstorage.la @@ -172,8 +174,6 @@ test_programs = \ test-mailbox-get \ test-mailbox-list -noinst_PROGRAMS = $(test_programs) - test_libs = \ $(top_builddir)/src/lib-var-expand/libvar_expand.la \ $(top_builddir)/src/lib-test/libtest.la \ @@ -203,11 +203,6 @@ test_mailbox_list_SOURCES = test-mailbox-list.c test_mailbox_list_LDADD = libstorage.la $(LIBDOVECOT) test_mailbox_list_DEPENDENCIES = libstorage.la $(LIBDOVECOT_DEPS) -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) noinst_HEADERS = $(test_headers) diff --git a/src/lib-var-expand-crypt/Makefile.am b/src/lib-var-expand-crypt/Makefile.am index 74bc05a799..24b6ca56f5 100644 --- a/src/lib-var-expand-crypt/Makefile.am +++ b/src/lib-var-expand-crypt/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + module_LTLIBRARIES = var_expand_crypt.la AM_CPPFLAGS = \ @@ -18,8 +20,6 @@ pkginc_lib_HEADERS = $(headers) test_programs = \ test-var-expand-crypt -noinst_PROGRAMS = $(test_programs) - test_libs = \ $(LIBUNWIND_LIBS) \ $(module_LTLIBRARIES) \ @@ -42,8 +42,3 @@ endif test_var_expand_crypt_CFLAGS = $(AM_CFLAGS) \ -DDCRYPT_BUILD_DIR=\"$(top_builddir)/src/lib-dcrypt\" - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib-var-expand/Makefile.am b/src/lib-var-expand/Makefile.am index 172057788e..3e4f49a57f 100644 --- a/src/lib-var-expand/Makefile.am +++ b/src/lib-var-expand/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + noinst_LTLIBRARIES = libvar_expand.la # Squelch autoconf error about using .[ly] sources but not defining $(LEX) @@ -56,8 +58,6 @@ pkginc_lib_HEADERS = $(headers) test_programs = \ test-var-expand -noinst_PROGRAMS = $(test_programs) - test_libs = \ libvar_expand.la \ ../lib-regex/libdregex.la \ @@ -67,8 +67,3 @@ test_libs = \ test_var_expand_SOURCE = test-var-expand.c test_var_expand_LDADD = $(test_libs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 1d5babad9a..650bfeb0f6 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ $(LIBUNWIND_CFLAGS) @@ -415,7 +417,6 @@ headers = \ write-full.h test_programs = test-lib -noinst_PROGRAMS = $(test_programs) test_lib_CPPFLAGS = \ -I$(top_srcdir)/src/lib-test \ @@ -531,11 +532,6 @@ test_headers = \ test_lib_LDADD = $(test_libs) -lm test_lib_DEPENDENCIES = $(test_libs) -check-local: $(UCD_FILES) - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) noinst_HEADERS = $(test_headers) diff --git a/src/plugins/acl/Makefile.am b/src/plugins/acl/Makefile.am index 86d46bf3f7..b431c3ce32 100644 --- a/src/plugins/acl/Makefile.am +++ b/src/plugins/acl/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + doveadm_moduledir = $(moduledir)/doveadm AM_CPPFLAGS = \ @@ -76,10 +78,3 @@ test_deps = \ test_acl_SOURCES = test-acl.c test_acl_LDADD = $(test_libs) test_acl_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! env $(test_options) $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - -noinst_PROGRAMS = $(test_programs) diff --git a/src/plugins/fts-solr/Makefile.am b/src/plugins/fts-solr/Makefile.am index 9095153b7d..b3c36acb8f 100644 --- a/src/plugins/fts-solr/Makefile.am +++ b/src/plugins/fts-solr/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-ssl-iostream \ @@ -46,8 +48,6 @@ test_libs = \ ../../lib/liblib.la \ $(MODULE_LIBS) -noinst_PROGRAMS = test-solr-response - test_solr_response_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(top_srcdir)/src/lib-test @@ -59,9 +59,3 @@ test_solr_response_LDADD = \ pkginc_libdir=$(pkgincludedir) pkginc_lib_HEADERS = $(headers) - -check: check-am check-test -check-test: all-am - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/plugins/mail-crypt/Makefile.am b/src/plugins/mail-crypt/Makefile.am index e867edc54a..f192512175 100644 --- a/src/plugins/mail-crypt/Makefile.am +++ b/src/plugins/mail-crypt/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-test \ @@ -106,10 +108,3 @@ noinst_HEADERS = \ mail-crypt-common.h \ mail-crypt-global-key.h \ mail-crypt-key.h - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - -noinst_PROGRAMS = $(test_programs) diff --git a/src/plugins/mail-lua/Makefile.am b/src/plugins/mail-lua/Makefile.am index cab4b32ea3..fcb81f61d2 100644 --- a/src/plugins/mail-lua/Makefile.am +++ b/src/plugins/mail-lua/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-mail \ @@ -28,11 +30,5 @@ pkginc_lib_HEADERS = \ test_programs = -check-local: - for bin in $(test_programs); do \ - if ! env $(test_options) $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done - -noinst_PROGRAMS = $(test_programs) noinst_HEADERS = \ mail-lua-settings.h diff --git a/src/plugins/pop3-migration/Makefile.am b/src/plugins/pop3-migration/Makefile.am index 4d0902a847..93c93fc8fd 100644 --- a/src/plugins/pop3-migration/Makefile.am +++ b/src/plugins/pop3-migration/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib-test \ @@ -20,8 +22,6 @@ lib05_pop3_migration_plugin_la_SOURCES = \ noinst_HEADERS = \ pop3-migration-plugin.h -noinst_PROGRAMS = $(test_programs) - test_programs = \ test-pop3-migration-plugin @@ -36,8 +36,3 @@ test_deps = \ test_pop3_migration_plugin_SOURCES = test-pop3-migration-plugin.c test_pop3_migration_plugin_LDADD = pop3-migration-plugin.lo $(test_libs) test_pop3_migration_plugin_DEPENDENCIES = $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/plugins/quota/Makefile.am b/src/plugins/quota/Makefile.am index 14e5c7027a..9747f9bbc6 100644 --- a/src/plugins/quota/Makefile.am +++ b/src/plugins/quota/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + doveadm_moduledir = $(moduledir)/doveadm pkglibexecdir = $(libexecdir)/dovecot @@ -119,7 +121,6 @@ clean-generic: test_programs = \ test-quota-util -noinst_PROGRAMS = $(test_programs) test_libs = \ $(LIBDOVECOT_STORAGE) \ @@ -131,8 +132,3 @@ test_deps = $(noinst_LTLIBRARIES) \ test_quota_util_SOURCES = test-quota-util.c test_quota_util_LDADD = quota-util.lo $(test_libs) test_quota_util_DEPENDENCIES = quota-util.lo $(test_deps) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done diff --git a/src/stats/Makefile.am b/src/stats/Makefile.am index a0e397bad0..510852d7ac 100644 --- a/src/stats/Makefile.am +++ b/src/stats/Makefile.am @@ -1,3 +1,5 @@ +include $(top_srcdir)/Makefile.test.include + pkglibexecdir = $(libexecdir)/dovecot pkglibexec_PROGRAMS = stats @@ -90,12 +92,6 @@ test_client_reader_LDADD = $(test_libs) test_client_reader_DEPENDENCIES = $(test_deps) test_programs = test-stats-metrics test-client-writer test-client-reader -noinst_PROGRAMS = $(test_programs) - -check-local: - for bin in $(test_programs); do \ - if ! $(RUN_TEST) ./$$bin; then exit 1; fi; \ - done LIBDOVECOT_TEST_DEPS = \ ../lib-ssl-iostream/libssl_iostream.la \