summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-11-09 13:51:19 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-11-09 15:14:09 (GMT)
commitb666b297dd3bce7fd3ccd8d350858bc2a737315f (patch) (side-by-side diff)
treed98ef0fcf504a58b96a2bf9ebcfb0760aab9d907
parent78e1bab77662b9a23a699320d9dd18a7cab4a8d7 (diff)
downloadmailutils-b666b297dd3bce7fd3ccd8d350858bc2a737315f.tar.gz
mailutils-b666b297dd3bce7fd3ccd8d350858bc2a737315f.tar.bz2
Reorganize testsuite
Simplify Makefile.am's in tests subdirectories by moving the common part in a separate file and including it where necessary. Build only one copy of package.m4. Both package.m4 and include file testsuite.am reside in the testsuite directory. Also provide configure options for selecting mda components to build: --disable-build-mda do not build mda --disable-build-lmtpd do not build lmtpd --disable-build-putmail do not build putmail * .gitignore: Update. * Makefile.am [MU_COND_MDA]: Change to MU_COND_MDA_TOOLS * configure.ac: Provide a way to enable/disable building of mda, lmtpd and putmail separately. Build testsuite/package.m4 * testsuite/testsuite.am * testsuite/Makefile.am: Distribute both package.m4.in and package.m4. Include main part from testsuite.am * testsuite/package.m4.in: New file. * comsat/tests/Makefile.am: Include main part from testsuite.am * frm/tests/Makefile.am: Likewise. * imap4d/tests/Makefile.am: Likewise. * libmailutils/tests/Makefile.am: Likewise. * libmu_scm/tests/Makefile.am: Likewise. * libproto/dotmail/tests/Makefile.am: Likewise. * mail/tests/Makefile.am: Likewise. * messages/tests/Makefile.am: Likewise. * mh/tests/Makefile.am: Likewise. * mimeview/tests/Makefile.am: Likewise. * readmsg/tests/Makefile.am: Likewise. * sieve/tests/Makefile.am: Likewise. * mda/.gitignore: Remove. * mda/tests/Makefile.am: Remove. * mda/tests/testsuite.at: Remove. * mda/tests/.gitignore: Remove. * mda/tests/atlocal.in: Remove. * mda/tests/mda.inc: New file. * mda/Makefile.am: Add extra directory level. Add subdirs depending on whether the corresponding component is selected for building. * mda/lmtpd/.gitignore: New file. * mda/lmtpd/Makefile.am: New file. * mda/lmtpd.c: Move to mda/lmtpd/lmtpd.c * mda/lmtpd/tests/.gitignore: New file. * mda/lmtpd/tests/Makefile.am: New file. * mda/lmtpd/tests/atlocal.in: New file. * mda/tests/lmtpd.at: Move to mda/lmtpd/tests/lmtpd.at * mda/lmtpd/tests/testsuite.at: New file. * mda/mda/.gitignore: New file. * mda/mda/Makefile.am: New file. * mda/mda.c: Move to mda/mda/mda.c * mda/mda/tests/.gitignore: New file. * mda/mda/tests/Makefile.am: New file. * mda/mda/tests/atlocal.in: New file. * mda/tests/forward.at: Move to mda/mda/tests/forward.at * mda/tests/mda.at: Move to mda/mda/tests/mda.at * mda/mda/tests/testsuite.at: New file. * mda/putmail/.gitignore: New file. * mda/putmail/Makefile.am: New file. * mda/putmail.c: Move to mda/putmail/putmail.c * mda/putmail/tests/.gitignore: New file. * mda/putmail/tests/Makefile.am: New file. * mda/putmail/tests/atlocal.in: New file. * mda/tests/putmail.at: Move to mda/putmail/tests/putmail.at * mda/putmail/tests/testsuite.at: New file * po/POTFILES.in: Update pathnames * maint/fullcheck.mk: Minor fixes.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--.gitignore3
-rw-r--r--Makefile.am2
-rw-r--r--comsat/tests/Makefile.am65
-rw-r--r--configure.ac14
-rw-r--r--frm/tests/Makefile.am65
-rw-r--r--imap4d/tests/Makefile.am48
-rw-r--r--libmailutils/tests/Makefile.am53
-rw-r--r--libmailutils/tests/testsuite.at3
-rw-r--r--libmu_scm/tests/Makefile.am47
-rw-r--r--libproto/dotmail/tests/Makefile.am39
-rw-r--r--mail/tests/Makefile.am48
-rw-r--r--maint/fullcheck.mk11
-rw-r--r--mda/.gitignore3
-rw-r--r--mda/Makefile.am64
-rw-r--r--mda/lmtpd/.gitignore1
-rw-r--r--mda/lmtpd/Makefile.am (copied from mda/tests/testsuite.at)55
-rw-r--r--mda/lmtpd/lmtpd.c (renamed from mda/lmtpd.c)0
-rw-r--r--mda/lmtpd/tests/.gitignore (copied from mda/tests/.gitignore)2
-rw-r--r--mda/lmtpd/tests/Makefile.am (copied from mda/tests/putmail.at)25
-rw-r--r--mda/lmtpd/tests/atlocal.in6
-rw-r--r--mda/lmtpd/tests/lmtpd.at (renamed from mda/tests/lmtpd.at)0
-rw-r--r--mda/lmtpd/tests/testsuite.at (copied from mda/tests/testsuite.at)19
-rw-r--r--mda/mda/.gitignore1
-rw-r--r--mda/mda/Makefile.am50
-rw-r--r--mda/mda/mda.c (renamed from mda/mda.c)0
-rw-r--r--mda/mda/tests/.gitignore (copied from mda/tests/.gitignore)1
-rw-r--r--mda/mda/tests/Makefile.am55
-rw-r--r--mda/mda/tests/atlocal.in6
-rw-r--r--mda/mda/tests/forward.at (renamed from mda/tests/forward.at)0
-rw-r--r--mda/mda/tests/mda.at (renamed from mda/tests/mda.at)0
-rw-r--r--mda/mda/tests/testsuite.at (copied from mda/tests/testsuite.at)15
-rw-r--r--mda/putmail/.gitignore1
-rw-r--r--mda/putmail/Makefile.am (copied from mda/tests/testsuite.at)54
-rw-r--r--mda/putmail/putmail.c (renamed from mda/putmail.c)0
-rw-r--r--mda/putmail/tests/.gitignore (renamed from mda/tests/.gitignore)2
-rw-r--r--mda/putmail/tests/Makefile.am (copied from mda/tests/putmail.at)24
-rw-r--r--mda/putmail/tests/atlocal.in6
-rw-r--r--mda/putmail/tests/putmail.at (renamed from mda/tests/putmail.at)0
-rw-r--r--mda/putmail/tests/testsuite.at (renamed from mda/tests/testsuite.at)20
-rw-r--r--mda/tests/Makefile.am102
-rw-r--r--mda/tests/atlocal.in35
-rw-r--r--mda/tests/mda.inc30
-rw-r--r--messages/tests/Makefile.am65
-rw-r--r--mh/tests/Makefile.am50
-rw-r--r--mimeview/tests/Makefile.am50
-rw-r--r--po/POTFILES.in6
-rw-r--r--readmsg/tests/Makefile.am71
-rw-r--r--sieve/tests/Makefile.am53
-rw-r--r--testsuite/Makefile.am55
-rw-r--r--testsuite/cwdrepl.c2
-rw-r--r--testsuite/package.m4.in7
-rw-r--r--testsuite/testsuite.am47
52 files changed, 357 insertions, 1024 deletions
diff --git a/.gitignore b/.gitignore
index e4d9c7a..5271624 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
*.pyo
*.so
*~
+*.bak
.bootstrap
.deps
.emacs*
@@ -39,3 +40,5 @@ stamp-h1
tmp/
/patch/
.gdbinit
+conf.*.sh
+_fullcheck
diff --git a/Makefile.am b/Makefile.am
index 716be7a..2b49200 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,7 +32,7 @@ if MU_COND_IMAP4D
IMAP4D_DIR = imap4d
endif
-if MU_COND_MDA
+if MU_COND_MDA_TOOLS
MDA_DIR = mda
endif
diff --git a/comsat/tests/Makefile.am b/comsat/tests/Makefile.am
index 57c8bd3..cc1e08b 100644
--- a/comsat/tests/Makefile.am
+++ b/comsat/tests/Makefile.am
@@ -1,64 +1 @@
-# This file is part of GNU Mailutils.
-# Copyright (C) 2010-2019 Free Software Foundation, Inc.
-#
-# GNU Mailutils is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 3, or (at
-# your option) any later version.
-#
-# GNU Mailutils is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
+include $(top_srcdir)/testsuite/testsuite.am
diff --git a/configure.ac b/configure.ac
index 1752145..f74b10e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1326,8 +1326,12 @@ MU_ENABLE_BUILD(pop3d,,,["$mu_build_servers" = yes],,[server_list])
MU_ENABLE_BUILD(imap4d,,,["$mu_build_servers" = yes],,[server_list])
MU_ENABLE_BUILD(comsat,,,["$mu_build_servers" = yes],,[server_list])
+MU_ENABLE_BUILD(mda,[mu_build_mda_tools=yes],,["$mu_build_servers" = yes],,[server_list])
+MU_ENABLE_BUILD(lmtpd,[mu_build_mda_tools=yes],,["$mu_build_servers" = yes],,[server_list])
+MU_ENABLE_BUILD(putmail,[mu_build_mda_tools=yes],,["$mu_build_clients" = yes],,[client_list])
+AM_CONDITIONAL([MU_COND_MDA_TOOLS],[test "$mu_build_mda_tools" = yes])
+
MU_ENABLE_BUILD(frm,,,["$mu_build_clients" = yes],,[client_list])
-MU_ENABLE_BUILD(mda,,,["$mu_build_clients" = yes],,[client_list])
MU_ENABLE_BUILD(mail,,,["$mu_build_clients" = yes],,[client_list])
AC_SUBST([MAILBINDIR],'${bindir}')
@@ -1364,9 +1368,12 @@ test -z "$client_list" && client_list=" [NONE]"
AC_CONFIG_TESTDIR(testsuite)
AC_CONFIG_FILES([testsuite/Makefile testsuite/atlocal])
+AC_CONFIG_FILES([testsuite/package.m4])
MU_CONFIG_TESTSUITE(libmailutils)
MU_CONFIG_TESTSUITE(frm)
-MU_CONFIG_TESTSUITE(mda)
+MU_CONFIG_TESTSUITE(mda/lmtpd)
+MU_CONFIG_TESTSUITE(mda/mda)
+MU_CONFIG_TESTSUITE(mda/putmail)
MU_CONFIG_TESTSUITE(mail)
MU_CONFIG_TESTSUITE(messages)
MU_CONFIG_TESTSUITE(readmsg)
@@ -1523,6 +1530,9 @@ AC_CONFIG_FILES([
libproto/mailer/Makefile
mda/Makefile
mda/lib/Makefile
+ mda/lmtpd/Makefile
+ mda/mda/Makefile
+ mda/putmail/Makefile
mail/Makefile
mail/testsuite/Makefile
libmailutils/auth/Makefile
diff --git a/frm/tests/Makefile.am b/frm/tests/Makefile.am
index 72959eb..cc1e08b 100644
--- a/frm/tests/Makefile.am
+++ b/frm/tests/Makefile.am
@@ -1,64 +1 @@
-# This file is part of GNU Mailutils.
-# Copyright (C) 2007-2019 Free Software Foundation, Inc.
-#
-# GNU Mailutils is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 3, or (at
-# your option) any later version.
-#
-# GNU Mailutils is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
+include $(top_srcdir)/testsuite/testsuite.am
diff --git a/imap4d/tests/Makefile.am b/imap4d/tests/Makefile.am
index 2e471c2..50d0983 100644
--- a/imap4d/tests/Makefile.am
+++ b/imap4d/tests/Makefile.am
@@ -14,23 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
+include $(top_srcdir)/testsuite/testsuite.am
## -------------------------- ##
## Non-installable programs
@@ -40,11 +24,7 @@ AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@
noinst_PROGRAMS = ckiconv
LDADD = ${MU_LIB_MAILUTILS}
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
+TESTSUITE_AT += \
anystate.at\
append00.at\
append01.at\
@@ -60,28 +40,6 @@ TESTSUITE_AT = \
list.at\
search.at\
select.at\
- status.at\
- testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
+ status.at
diff --git a/libmailutils/tests/Makefile.am b/libmailutils/tests/Makefile.am
index bc839c3..a933152 100644
--- a/libmailutils/tests/Makefile.am
+++ b/libmailutils/tests/Makefile.am
@@ -14,25 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
+include $(top_srcdir)/testsuite/testsuite.am
+AUTOTEST_INCLUDES += -I $(top_srcdir)/libmailutils/wordsplit
## -------------------------- ##
## Non-installable programs
@@ -97,11 +80,7 @@ LDADD = ${MU_LIB_MAILUTILS}
EXTRA_DIST += Encode Decode Wicketfile
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
+TESTSUITE_AT += \
address.at\
base64d.at\
base64e.at\
@@ -188,7 +167,6 @@ TESTSUITE_AT = \
strin.at\
strout.at\
strtoc.at\
- testsuite.at\
url.at\
url-comp.at\
xml.at\
@@ -199,31 +177,6 @@ TESTSUITE_AT = \
wordwrap03.at\
xscript.at
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) \
- -I $(srcdir)\
- -I $(top_srcdir)/testsuite\
- -I $(top_srcdir)/libmailutils/wordsplit\
- testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
# ###########################
# Wordsplit testsuite
# ###########################
diff --git a/libmailutils/tests/testsuite.at b/libmailutils/tests/testsuite.at
index 05b77b1..39fdfa7 100644
--- a/libmailutils/tests/testsuite.at
+++ b/libmailutils/tests/testsuite.at
@@ -182,6 +182,9 @@ m4_include([xscript.at])
m4_include([list.at])
m4_include([address.at])
+
+AT_BANNER(Wordsplit)
+
m4_include([wordsplit.at])
m4_include([exp.at])
m4_include([url.at])
diff --git a/libmu_scm/tests/Makefile.am b/libmu_scm/tests/Makefile.am
index 26b6d49..d429146 100644
--- a/libmu_scm/tests/Makefile.am
+++ b/libmu_scm/tests/Makefile.am
@@ -14,32 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+include $(top_srcdir)/testsuite/testsuite.am
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
- testsuite.at\
+TESTSUITE_AT += \
const.at\
mailbox-open.at\
mailbox-open-exc.at\
@@ -85,25 +62,5 @@ TESTSUITE_AT = \
mime-get-part.at\
mime-add-part.at
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
diff --git a/libproto/dotmail/tests/Makefile.am b/libproto/dotmail/tests/Makefile.am
index cdf76c8..ab38392 100644
--- a/libproto/dotmail/tests/Makefile.am
+++ b/libproto/dotmail/tests/Makefile.am
@@ -14,25 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
+include $(top_srcdir)/testsuite/testsuite.am
## -------------------------- ##
## Non-installable programs
@@ -52,8 +34,7 @@ LDADD = ${MU_LIB_DOTMAIL} ${MU_LIB_MAILUTILS}
## Test suite. ##
## ------------ ##
-TESTSUITE_AT = \
- testsuite.at\
+TESTSUITE_AT += \
autodetect.at\
count.at\
env.at\
@@ -69,21 +50,5 @@ TESTSUITE_AT = \
delete.at\
setattr.at
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
diff --git a/mail/tests/Makefile.am b/mail/tests/Makefile.am
index bf3762f..4f805b5 100644
--- a/mail/tests/Makefile.am
+++ b/mail/tests/Makefile.am
@@ -14,31 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+include $(top_srcdir)/testsuite/testsuite.am
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT =\
+TESTSUITE_AT +=\
D.at\
align.at\
cols00.at\
@@ -53,25 +31,3 @@ TESTSUITE_AT =\
testsuite.at\
version.at
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
diff --git a/maint/fullcheck.mk b/maint/fullcheck.mk
index 038a30c..c636380 100644
--- a/maint/fullcheck.mk
+++ b/maint/fullcheck.mk
@@ -8,9 +8,10 @@
#
FORMATS = mbox dotmail mh maildir
DISTNAME = $(PACKAGE)-$(PACKAGE_VERSION)
+FULLCHECKDIR = _fullcheck
fullcheck: $(foreach fmt,$(FORMATS),check-$(fmt))
- @rmdir fullcheck
+ @rmdir $(FULLCHECKDIR)
@text="$(DISTNAME) passed all tests";\
echo $$text | sed -e 's/./=/g';\
echo $$text;\
@@ -23,20 +24,20 @@ $(DISTNAME).tar.gz: ChangeLog
define fullcheckdir_tmpl
fullcheckdir-$(1):
- rm -rf fullcheckdir/$(1)
- mkdir -p fullcheckdir/$(1)
+ rm -rf $(FULLCHECKDIR)/$(1)
+ mkdir -p $(FULLCHECKDIR)/$(1)
endef
define fullcheck_tmpl
check-$(fmt): fullcheck_dist fullcheckdir-$(fmt)
- cd fullcheckdir/$(fmt) && \
+ cd $(FULLCHECKDIR)/$(fmt) && \
tar xf ../../$(DISTNAME).tar.gz && \
cd $(DISTNAME) && \
mkdir .build && \
cd .build && \
../configure MU_DEFAULT_SCHEME=$(fmt) && \
make check
- rm -rf fullcheckdir/$(fmt)
+ rm -rf $(FULLCHECKDIR)/$(fmt)
endef
$(foreach fmt,$(FORMATS),$(eval $(call fullcheckdir_tmpl,$(fmt))))
diff --git a/mda/.gitignore b/mda/.gitignore
deleted file mode 100644
index f0e6495..0000000
--- a/mda/.gitignore
+++ b/dev/null
@@ -1,3 +0,0 @@
-lmtpd
-mda
-putmail
diff --git a/mda/Makefile.am b/mda/Makefile.am
index 7a05036..9191641 100644
--- a/mda/Makefile.am
+++ b/mda/Makefile.am
@@ -13,60 +13,16 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-SUBDIRS = lib . tests
-sbin_PROGRAMS = mda lmtpd
-bin_PROGRAMS = putmail
+SUBDIRS = lib
-mda_SOURCES = mda.c
-lmtpd_SOURCES = lmtpd.c
-putmail_SOURCES = putmail.c
-
-if MU_COND_DBM
- LIBMU_DBM=${top_builddir}/libmu_dbm/libmu_dbm.la
+if MU_COND_MDA
+ SUBDIRS += mda
+endif
+if MU_COND_LMTPD
+ SUBDIRS += lmtpd
+endif
+if MU_COND_PUTMAIL
+ SUBDIRS += putmail
endif
-LDADD = \
- lib/libmda.a\
- ${top_builddir}/lib/libmuscript.a\
- ${MU_APP_LIBRARIES}\
- ${MU_LIB_SIEVE}\
- ${MU_LIB_MAILBOX}\
- ${MU_LIB_AUTH}\
- ${MU_LIB_MAILER}\
- @MU_AUTHLIBS@\
- ${MU_LIB_MAILUTILS} \
- @MU_COMMON_LIBRARIES@\
- @LIBMU_SCM@\
- @LIBMU_SCM_DEPS@\
- @MU_LIB_PY@\
- $(LIBMU_DBM)\
- @GUILE_LIBS@\
- @PYTHON_LIBS@\
- @DBMLIBS@
-
-lmtpd_LDADD = \
- lib/libmda.a\
- ${top_builddir}/lib/libmuscript.a\
- ${MU_APP_LIBRARIES}\
- ${MU_LIB_SIEVE}\
- ${MU_LIB_MAILBOX}\
- ${MU_LIB_AUTH}\
- ${MU_LIB_MAILER}\
- @MU_AUTHLIBS@\
- ${MU_LIB_MAILUTILS} \
- @MU_COMMON_LIBRARIES@\
- @LIBMU_SCM@\
- @LIBMU_SCM_DEPS@\
- @MU_LIB_PY@\
- $(LIBMU_DBM)\
- @GUILE_LIBS@\
- @PYTHON_LIBS@\
- @DBMLIBS@\
- @MU_TCPWRAP_LIBRARIES@
-
-AM_CPPFLAGS = -I${top_srcdir} @MU_APP_COMMON_INCLUDES@ -I${srcdir}/lib
-
-install-exec-hook:
- -chown root:mail $(DESTDIR)$(sbindir)/mda &&\
- chmod 4755 $(DESTDIR)$(sbindir)/mda
-
+EXTRA_DIST = tests/input.msg tests/mda.inc
diff --git a/mda/lmtpd/.gitignore b/mda/lmtpd/.gitignore
new file mode 100644
index 0000000..6c8868b
--- a/dev/null
+++ b/mda/lmtpd/.gitignore
@@ -0,0 +1 @@
+lmtpd
diff --git a/mda/tests/testsuite.at b/mda/lmtpd/Makefile.am
index 4135e4c..4e99277 100644
--- a/mda/tests/testsuite.at
+++ b/mda/lmtpd/Makefile.am
@@ -1,5 +1,4 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2010-2019 Free Software Foundation, Inc.
+# Copyright (C) 2007-2019 Free Software Foundation, Inc.
#
# GNU Mailutils is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -14,26 +13,36 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-m4_include([testsuite.inc])
-
-m4_define([MDA_OPTIONS],[dnl
-MUT_DEFAULT_OPTIONS dnl
---set '|mailbox|mailbox-pattern='`pwd`/spool/'${user}' dnl
---set .auth.authorization=system])
-
-AT_INIT
-AT_TESTED([lmtpd])
-MUT_VERSION(lmtpd)
-m4_include([lmtpd.at])
-
-AT_TESTED([putmail])
-MUT_VERSION(putmail)
-m4_include([putmail.at])
-
-AT_TESTED([mda])
-MUT_VERSION(testmda)
-m4_include([mda.at])
-m4_include([forward.at])
-
+SUBDIRS = . tests
+
+sbin_PROGRAMS = lmtpd
+
+lmtpd_SOURCES = lmtpd.c
+
+AM_CPPFLAGS = -I${top_srcdir} @MU_APP_COMMON_INCLUDES@ -I${srcdir}/../lib
+
+if MU_COND_DBM
+ LIBMU_DBM=${top_builddir}/libmu_dbm/libmu_dbm.la
+endif
+
+lmtpd_LDADD = \
+ ../lib/libmda.a\
+ ${top_builddir}/lib/libmuscript.a\
+ ${MU_APP_LIBRARIES}\
+ ${MU_LIB_SIEVE}\
+ ${MU_LIB_MAILBOX}\
+ ${MU_LIB_AUTH}\
+ ${MU_LIB_MAILER}\
+ @MU_AUTHLIBS@\
+ ${MU_LIB_MAILUTILS} \
+ @MU_COMMON_LIBRARIES@\
+ @LIBMU_SCM@\
+ @LIBMU_SCM_DEPS@\
+ @MU_LIB_PY@\
+ $(LIBMU_DBM)\
+ @GUILE_LIBS@\
+ @PYTHON_LIBS@\
+ @DBMLIBS@\
+ @MU_TCPWRAP_LIBRARIES@
diff --git a/mda/lmtpd.c b/mda/lmtpd/lmtpd.c
index 2ffdd6a..2ffdd6a 100644
--- a/mda/lmtpd.c
+++ b/mda/lmtpd/lmtpd.c
diff --git a/mda/tests/.gitignore b/mda/lmtpd/tests/.gitignore
index ad1a765..cac101d 100644
--- a/mda/tests/.gitignore
+++ b/mda/lmtpd/tests/.gitignore
@@ -1,7 +1,5 @@
atconfig
atlocal
-package.m4
testsuite
testsuite.dir
testsuite.log
-testmda
diff --git a/mda/tests/putmail.at b/mda/lmtpd/tests/Makefile.am
index d0fe28a..ef43614 100644
--- a/mda/tests/putmail.at
+++ b/mda/lmtpd/tests/Makefile.am
@@ -1,5 +1,5 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2010-2019 Free Software Foundation, Inc.
+# This file is part of GNU Mailutils.
+# Copyright (C) 2007-2019 Free Software Foundation, Inc.
#
# GNU Mailutils is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -14,21 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-AT_SETUP([putmail])
-AT_KEYWORDS([putmail])
-
-AT_CHECK([
-echo ENVELOPE > expout
-cat $INPUT_MSG >> expout
-echo "" >> expout
-mkdir spool
-
-putmail MDA_OPTIONS --from 'gulliver@example.net' mbox:spool/out < dnl
- $INPUT_MSG || exit $?
-sed '1s/From gulliver@example.net.*/ENVELOPE/' spool/out
-],
-[0],
-[expout])
-
-AT_CLEANUP
- \ No newline at end of file
+include $(top_srcdir)/testsuite/testsuite.am
+AUTOTEST_INCLUDES += -I $(srcdir)/../../tests
+TESTSUITE_AT += lmtpd.at
diff --git a/mda/lmtpd/tests/atlocal.in b/mda/lmtpd/tests/atlocal.in
new file mode 100644
index 0000000..9c4bfa4
--- a/dev/null
+++ b/mda/lmtpd/tests/atlocal.in
@@ -0,0 +1,6 @@
+# @configure_input@ -*- shell-script -*-
+# Configurable variable values for Mailutils test suite.
+# Copyright (C) 2004-2019 Free Software Foundation, Inc.
+
+PATH=@abs_builddir@/..:$PATH
+INPUT_MSG=$abs_top_srcdir/mda/tests/input.msg
diff --git a/mda/tests/lmtpd.at b/mda/lmtpd/tests/lmtpd.at
index ab892a1..ab892a1 100644
--- a/mda/tests/lmtpd.at
+++ b/mda/lmtpd/tests/lmtpd.at
diff --git a/mda/tests/testsuite.at b/mda/lmtpd/tests/testsuite.at
index 4135e4c..151a897 100644
--- a/mda/tests/testsuite.at
+++ b/mda/lmtpd/tests/testsuite.at
@@ -14,26 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-m4_include([testsuite.inc])
-
-m4_define([MDA_OPTIONS],[dnl
-MUT_DEFAULT_OPTIONS dnl
---set '|mailbox|mailbox-pattern='`pwd`/spool/'${user}' dnl
---set .auth.authorization=system])
+m4_include([mda.inc])
AT_INIT
AT_TESTED([lmtpd])
MUT_VERSION(lmtpd)
m4_include([lmtpd.at])
-
-AT_TESTED([putmail])
-MUT_VERSION(putmail)
-m4_include([putmail.at])
-
-AT_TESTED([mda])
-MUT_VERSION(testmda)
-m4_include([mda.at])
-m4_include([forward.at])
-
-
-
diff --git a/mda/mda/.gitignore b/mda/mda/.gitignore
new file mode 100644
index 0000000..e4f4874
--- a/dev/null
+++ b/mda/mda/.gitignore
@@ -0,0 +1 @@
+mda
diff --git a/mda/mda/Makefile.am b/mda/mda/Makefile.am
new file mode 100644
index 0000000..d2a7128
--- a/dev/null
+++ b/mda/mda/Makefile.am
@@ -0,0 +1,50 @@
+# Copyright (C) 2007-2019 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# GNU Mailutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+
+SUBDIRS = . tests
+
+sbin_PROGRAMS = mda
+
+mda_SOURCES = mda.c
+
+AM_CPPFLAGS = -I${top_srcdir} @MU_APP_COMMON_INCLUDES@ -I${srcdir}/../lib
+
+if MU_COND_DBM
+ LIBMU_DBM=${top_builddir}/libmu_dbm/libmu_dbm.la
+endif
+
+LDADD = \
+ ../lib/libmda.a\
+ ${top_builddir}/lib/libmuscript.a\
+ ${MU_APP_LIBRARIES}\
+ ${MU_LIB_SIEVE}\
+ ${MU_LIB_MAILBOX}\
+ ${MU_LIB_AUTH}\
+ ${MU_LIB_MAILER}\
+ @MU_AUTHLIBS@\
+ ${MU_LIB_MAILUTILS} \
+ @MU_COMMON_LIBRARIES@\
+ @LIBMU_SCM@\
+ @LIBMU_SCM_DEPS@\
+ @MU_LIB_PY@\
+ $(LIBMU_DBM)\
+ @GUILE_LIBS@\
+ @PYTHON_LIBS@\
+ @DBMLIBS@
+
+install-exec-hook:
+ -chown root:mail $(DESTDIR)$(sbindir)/mda &&\
+ chmod 4755 $(DESTDIR)$(sbindir)/mda
+
diff --git a/mda/mda.c b/mda/mda/mda.c
index 151df64..151df64 100644
--- a/mda/mda.c
+++ b/mda/mda/mda.c
diff --git a/mda/tests/.gitignore b/mda/mda/tests/.gitignore
index ad1a765..af0bc9a 100644
--- a/mda/tests/.gitignore
+++ b/mda/mda/tests/.gitignore
@@ -5,3 +5,4 @@ testsuite
testsuite.dir
testsuite.log
testmda
+testmda.c
diff --git a/mda/mda/tests/Makefile.am b/mda/mda/tests/Makefile.am
new file mode 100644
index 0000000..1045d83
--- a/dev/null
+++ b/mda/mda/tests/Makefile.am
@@ -0,0 +1,55 @@
+# This file is part of GNU Mailutils.
+# Copyright (C) 2007-2019 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# GNU Mailutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+
+include $(top_srcdir)/testsuite/testsuite.am
+AUTOTEST_INCLUDES += -I $(srcdir)/../../tests
+TESTSUITE_AT += mda.at forward.at
+
+noinst_PROGRAMS = testmda
+testmda_SOURCES = testmda.c
+testmda.c: ${srcdir}/../mda.c
+ cp ${srcdir}/../mda.c testmda.c
+BUILT_SOURCES = testmda.c
+if MU_COND_DBM
+ LIBMU_DBM=${top_builddir}/libmu_dbm/libmu_dbm.la
+endif
+LDADD = \
+ ${builddir}/../../lib/libmda.a\
+ ${top_builddir}/lib/libmuscript.a\
+ ${MU_APP_LIBRARIES}\
+ ${MU_LIB_SIEVE}\
+ ${MU_LIB_MAILBOX}\
+ ${MU_LIB_AUTH}\
+ ${MU_LIB_MAILER}\
+ @MU_AUTHLIBS@\
+ ${MU_LIB_MAILUTILS} \
+ @MU_COMMON_LIBRARIES@\
+ @LIBMU_SCM@\
+ @LIBMU_SCM_DEPS@\
+ @MU_LIB_PY@\
+ $(LIBMU_DBM)\
+ @GUILE_LIBS@\
+ @PYTHON_LIBS@\
+ @DBMLIBS@
+
+AM_CPPFLAGS = \
+ -I${top_srcdir}\
+ @MU_APP_COMMON_INCLUDES@\
+ -I${srcdir}/../../lib\
+ -DTESTSUITE_CONFIG_FILE=\"testmda.conf\"
+
+
+
diff --git a/mda/mda/tests/atlocal.in b/mda/mda/tests/atlocal.in
new file mode 100644
index 0000000..9c4bfa4
--- a/dev/null
+++ b/mda/mda/tests/atlocal.in
@@ -0,0 +1,6 @@
+# @configure_input@ -*- shell-script -*-
+# Configurable variable values for Mailutils test suite.
+# Copyright (C) 2004-2019 Free Software Foundation, Inc.
+
+PATH=@abs_builddir@/..:$PATH
+INPUT_MSG=$abs_top_srcdir/mda/tests/input.msg
diff --git a/mda/tests/forward.at b/mda/mda/tests/forward.at
index 0328e2d..0328e2d 100644
--- a/mda/tests/forward.at
+++ b/mda/mda/tests/forward.at
diff --git a/mda/tests/mda.at b/mda/mda/tests/mda.at
index 711520e..711520e 100644
--- a/mda/tests/mda.at
+++ b/mda/mda/tests/mda.at
diff --git a/mda/tests/testsuite.at b/mda/mda/tests/testsuite.at
index 4135e4c..630c97d 100644
--- a/mda/tests/testsuite.at
+++ b/mda/mda/tests/testsuite.at
@@ -14,22 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-m4_include([testsuite.inc])
-
-m4_define([MDA_OPTIONS],[dnl
-MUT_DEFAULT_OPTIONS dnl
---set '|mailbox|mailbox-pattern='`pwd`/spool/'${user}' dnl
---set .auth.authorization=system])
+m4_include([mda.inc])
AT_INIT
-AT_TESTED([lmtpd])
-MUT_VERSION(lmtpd)
-m4_include([lmtpd.at])
-
-AT_TESTED([putmail])
-MUT_VERSION(putmail)
-m4_include([putmail.at])
-
AT_TESTED([mda])
MUT_VERSION(testmda)
m4_include([mda.at])
diff --git a/mda/putmail/.gitignore b/mda/putmail/.gitignore
new file mode 100644
index 0000000..f8ec50c
--- a/dev/null
+++ b/mda/putmail/.gitignore
@@ -0,0 +1 @@
+putmail
diff --git a/mda/tests/testsuite.at b/mda/putmail/Makefile.am
index 4135e4c..ace0d78 100644
--- a/mda/tests/testsuite.at
+++ b/mda/putmail/Makefile.am
@@ -1,5 +1,4 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2010-2019 Free Software Foundation, Inc.
+# Copyright (C) 2007-2019 Free Software Foundation, Inc.
#
# GNU Mailutils is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -14,26 +13,31 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-m4_include([testsuite.inc])
-
-m4_define([MDA_OPTIONS],[dnl
-MUT_DEFAULT_OPTIONS dnl
---set '|mailbox|mailbox-pattern='`pwd`/spool/'${user}' dnl
---set .auth.authorization=system])
-
-AT_INIT
-AT_TESTED([lmtpd])
-MUT_VERSION(lmtpd)
-m4_include([lmtpd.at])
-
-AT_TESTED([putmail])
-MUT_VERSION(putmail)
-m4_include([putmail.at])
-
-AT_TESTED([mda])
-MUT_VERSION(testmda)
-m4_include([mda.at])
-m4_include([forward.at])
-
-
-
+SUBDIRS = . tests
+
+bin_PROGRAMS = putmail
+
+AM_CPPFLAGS = -I${top_srcdir} @MU_APP_COMMON_INCLUDES@ -I${srcdir}/../lib
+
+if MU_COND_DBM
+ LIBMU_DBM=${top_builddir}/libmu_dbm/libmu_dbm.la
+endif
+
+LDADD = \
+ ../lib/libmda.a\
+ ${top_builddir}/lib/libmuscript.a\
+ ${MU_APP_LIBRARIES}\
+ ${MU_LIB_SIEVE}\
+ ${MU_LIB_MAILBOX}\
+ ${MU_LIB_AUTH}\
+ ${MU_LIB_MAILER}\
+ @MU_AUTHLIBS@\
+ ${MU_LIB_MAILUTILS} \
+ @MU_COMMON_LIBRARIES@\
+ @LIBMU_SCM@\
+ @LIBMU_SCM_DEPS@\
+ @MU_LIB_PY@\
+ $(LIBMU_DBM)\
+ @GUILE_LIBS@\
+ @PYTHON_LIBS@\
+ @DBMLIBS@
diff --git a/mda/putmail.c b/mda/putmail/putmail.c
index 55cc18c..55cc18c 100644
--- a/mda/putmail.c
+++ b/mda/putmail/putmail.c
diff --git a/mda/tests/.gitignore b/mda/putmail/tests/.gitignore
index ad1a765..cac101d 100644
--- a/mda/tests/.gitignore
+++ b/mda/putmail/tests/.gitignore
@@ -1,7 +1,5 @@
atconfig
atlocal
-package.m4
testsuite
testsuite.dir
testsuite.log
-testmda
diff --git a/mda/tests/putmail.at b/mda/putmail/tests/Makefile.am
index d0fe28a..be82a4b 100644
--- a/mda/tests/putmail.at
+++ b/mda/putmail/tests/Makefile.am
@@ -1,5 +1,5 @@
-# This file is part of GNU Mailutils. -*- Autotest -*-
-# Copyright (C) 2010-2019 Free Software Foundation, Inc.
+# This file is part of GNU Mailutils.
+# Copyright (C) 2007-2019 Free Software Foundation, Inc.
#
# GNU Mailutils is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
@@ -14,21 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-AT_SETUP([putmail])
-AT_KEYWORDS([putmail])
+include $(top_srcdir)/testsuite/testsuite.am
+AUTOTEST_INCLUDES += -I $(srcdir)/../../tests
+TESTSUITE_AT += putmail.at
-AT_CHECK([
-echo ENVELOPE > expout
-cat $INPUT_MSG >> expout
-echo "" >> expout
-mkdir spool
-
-putmail MDA_OPTIONS --from 'gulliver@example.net' mbox:spool/out < dnl
- $INPUT_MSG || exit $?
-sed '1s/From gulliver@example.net.*/ENVELOPE/' spool/out
-],
-[0],
-[expout])
-
-AT_CLEANUP
- \ No newline at end of file
diff --git a/mda/putmail/tests/atlocal.in b/mda/putmail/tests/atlocal.in
new file mode 100644
index 0000000..9c4bfa4
--- a/dev/null
+++ b/mda/putmail/tests/atlocal.in
@@ -0,0 +1,6 @@
+# @configure_input@ -*- shell-script -*-
+# Configurable variable values for Mailutils test suite.
+# Copyright (C) 2004-2019 Free Software Foundation, Inc.
+
+PATH=@abs_builddir@/..:$PATH
+INPUT_MSG=$abs_top_srcdir/mda/tests/input.msg
diff --git a/mda/tests/putmail.at b/mda/putmail/tests/putmail.at
index d0fe28a..d0fe28a 100644
--- a/mda/tests/putmail.at
+++ b/mda/putmail/tests/putmail.at
diff --git a/mda/tests/testsuite.at b/mda/putmail/tests/testsuite.at
index 4135e4c..6278aac 100644
--- a/mda/tests/testsuite.at
+++ b/mda/putmail/tests/testsuite.at
@@ -13,27 +13,9 @@
#
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-
-m4_include([testsuite.inc])
-
-m4_define([MDA_OPTIONS],[dnl
-MUT_DEFAULT_OPTIONS dnl
---set '|mailbox|mailbox-pattern='`pwd`/spool/'${user}' dnl
---set .auth.authorization=system])
-
+m4_include([mda.inc])
AT_INIT
-AT_TESTED([lmtpd])
-MUT_VERSION(lmtpd)
-m4_include([lmtpd.at])
-
AT_TESTED([putmail])
MUT_VERSION(putmail)
m4_include([putmail.at])
-AT_TESTED([mda])
-MUT_VERSION(testmda)
-m4_include([mda.at])
-m4_include([forward.at])
-
-
-
diff --git a/mda/tests/Makefile.am b/mda/tests/Makefile.am
deleted file mode 100644
index bf8b8e5..0000000
--- a/mda/tests/Makefile.am
+++ b/dev/null
@@ -1,102 +0,0 @@
-# This file is part of GNU Mailutils.
-# Copyright (C) 2007-2019 Free Software Foundation, Inc.
-#
-# GNU Mailutils is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 3, or (at
-# your option) any later version.
-#
-# GNU Mailutils is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 input.msg
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
- lmtpd.at\
- mda.at\
- forward.at\
- putmail.at\
- testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-noinst_PROGRAMS = testmda
-testmda_SOURCES = testmda.c
-testmda.c: ${srcdir}/../mda.c
- cp ${srcdir}/../mda.c testmda.c
-BUILT_SOURCES = testmda.c
-if MU_COND_DBM
- LIBMU_DBM=${top_builddir}/libmu_dbm/libmu_dbm.la
-endif
-testmda_LDADD = \
- ${builddir}/../lib/libmda.a\
- ${top_builddir}/lib/libmuscript.a\
- ${MU_APP_LIBRARIES}\
- ${MU_LIB_SIEVE}\
- ${MU_LIB_MAILBOX}\
- ${MU_LIB_AUTH}\
- ${MU_LIB_MAILER}\
- @MU_AUTHLIBS@\
- ${MU_LIB_MAILUTILS} \
- @MU_COMMON_LIBRARIES@\
- @LIBMU_SCM@\
- @LIBMU_SCM_DEPS@\
- @MU_LIB_PY@\
- $(LIBMU_DBM)\
- @GUILE_LIBS@\
- @PYTHON_LIBS@\
- @DBMLIBS@
-
-testmda_CPPFLAGS = \
- -I${top_srcdir}\
- @MU_APP_COMMON_INCLUDES@\
- -I${srcdir}/../lib\
- -DTESTSUITE_CONFIG_FILE=\"testmda.conf\"
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
diff --git a/mda/tests/atlocal.in b/mda/tests/atlocal.in
deleted file mode 100644
index 89458b9..0000000
--- a/mda/tests/atlocal.in
+++ b/dev/null
@@ -1,35 +0,0 @@
-# @configure_input@ -*- shell-script -*-
-# Configurable variable values for Mailutils test suite.
-# Copyright (C) 2004-2019 Free Software Foundation, Inc.
-
-PATH=@abs_builddir@:@abs_top_builddir@/mda:$top_srcdir:$srcdir:$PATH
-INPUT_MSG=$abs_top_srcdir/mda/tests/input.msg
-MU_DEFAULT_SCHEME=@MU_DEFAULT_SCHEME@
-dumpmail() {
- case $MU_DEFAULT_SCHEME in
- mbox)
- sed -e '/^From /d' -e '$d' $1
- ;;
- dotmail)
- sed -e '/^\.$/d' $1
- ;;
- mh)
- sed -e /^X-IMAPbase:/d\
- -e /^X-UID:/d\
- -e /^X-Envelope-Sender:/d\
- -e /^X-Envelope-Date:/d $1/1
- ;;
- maildir)
- f=$(find $1/new -type f | head -n 1)
- if test -n $f; then
- sed -e /^X-IMAPbase:/d\
- -e /^X-UID:/d\
- -e /^X-Envelope-Sender:/d\
- -e /^X-Envelope-Date:/d $f
- fi
- ;;
- *) # Should not happen
- echo >&2 "Default mailbox format is uknown"
- esac
-}
-
diff --git a/mda/tests/mda.inc b/mda/tests/mda.inc
new file mode 100644
index 0000000..9591e4f
--- a/dev/null
+++ b/mda/tests/mda.inc
@@ -0,0 +1,30 @@
+m4_include([testsuite.inc])
+
+m4_define([MDA_OPTIONS],[dnl
+MUT_DEFAULT_OPTIONS dnl
+--set '|mailbox|mailbox-pattern='`pwd`/spool/'${user}' dnl
+--set .auth.authorization=system])
+
+m4_define([dumpmail],
+[m4_case(MU_DEFAULT_SCHEME,
+[mbox],
+[sed -e '/^From /d' -e '$d' $1],
+[dotmail],
+[sed -e '/^\.$/d' $1],
+[mh],
+[sed -e /^X-IMAPbase:/d\
+ -e /^X-UID:/d\
+ -e /^X-Envelope-Sender:/d\
+ -e /^X-Envelope-Date:/d $1/1],
+[maildir],
+[f=$(find $1/new -type f | head -n 1)
+ if test -n $f; then
+ sed -e /^X-IMAPbase:/d\
+ -e /^X-UID:/d\
+ -e /^X-Envelope-Sender:/d\
+ -e /^X-Envelope-Date:/d $f
+ fi],
+[# Should not happen
+ m4_fatal([Unknown default mailbox format (MU_DEFAULT_SCHEME)])])])
+
+
diff --git a/messages/tests/Makefile.am b/messages/tests/Makefile.am
index 72959eb..cc1e08b 100644
--- a/messages/tests/Makefile.am
+++ b/messages/tests/Makefile.am
@@ -1,64 +1 @@
-# This file is part of GNU Mailutils.
-# Copyright (C) 2007-2019 Free Software Foundation, Inc.
-#
-# GNU Mailutils is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 3, or (at
-# your option) any later version.
-#
-# GNU Mailutils is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
+include $(top_srcdir)/testsuite/testsuite.am
diff --git a/mh/tests/Makefile.am b/mh/tests/Makefile.am
index 8460270..8b744af 100644
--- a/mh/tests/Makefile.am
+++ b/mh/tests/Makefile.am
@@ -14,25 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 mhed movemsg
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
+include $(top_srcdir)/testsuite/testsuite.am
+EXTRA_DIST += mhed movemsg
## -------------------------- ##
## Non-installable programs ##
@@ -41,11 +24,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac
AM_CPPFLAGS = @MU_LIB_COMMON_INCLUDES@
noinst_PROGRAMS = lu
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
+TESTSUITE_AT += \
ali.at\
anno.at\
burst.at\
@@ -70,28 +49,7 @@ TESTSUITE_AT = \
refile.at\
repl.at\
rmf.at\
- rmm.at\
- testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
+ rmm.at
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
diff --git a/mimeview/tests/Makefile.am b/mimeview/tests/Makefile.am
index 84a3595..185e1b7 100644
--- a/mimeview/tests/Makefile.am
+++ b/mimeview/tests/Makefile.am
@@ -14,55 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-## -------------------------- ##
-## Non-installable programs ##
-## -------------------------- ##
+include $(top_srcdir)/testsuite/testsuite.am
noinst_PROGRAMS = bf
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 517800e..16ac238 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -57,9 +57,9 @@ libmu_sieve/extensions/vacation.c
# libproto/imap/folder.c
libproto/mbox/mbox.c
-mda/mda.c
-mda/lmtpd.c
-mda/putmail.c
+mda/mda/mda.c
+mda/lmtpd/lmtpd.c
+mda/putmail/putmail.c
mda/lib/deliver.c
mda/lib/forward.c
mda/lib/mailquota.c
diff --git a/readmsg/tests/Makefile.am b/readmsg/tests/Makefile.am
index 9dcd828..cc1e08b 100644
--- a/readmsg/tests/Makefile.am
+++ b/readmsg/tests/Makefile.am
@@ -1,70 +1 @@
-# This file is part of GNU Mailutils.
-# Copyright (C) 2007-2019 Free Software Foundation, Inc.
-#
-# GNU Mailutils is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 3, or (at
-# your option) any later version.
-#
-# GNU Mailutils is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN) { \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
- all.at\
- twomsg.at\
- hdr.at\
- nohdr.at\
- weed.at\
- testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
+include $(top_srcdir)/testsuite/testsuite.am
diff --git a/sieve/tests/Makefile.am b/sieve/tests/Makefile.am
index 8403cdc..0d899e2 100644
--- a/sieve/tests/Makefile.am
+++ b/sieve/tests/Makefile.am
@@ -14,32 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4 moderator.mbox
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-#SUBDIRS = etc
-
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN) { \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
-## ------------ ##
-## Test suite. ##
-## ------------ ##
-
-TESTSUITE_AT = \
+include $(top_srcdir)/testsuite/testsuite.am
+EXTRA_DIST += moderator.mbox
+TESTSUITE_AT += \
action.at\
addheader.at\
address.at\
@@ -68,30 +45,6 @@ TESTSUITE_AT = \
relational.at\
size.at\
true.at\
- testsuite.at\
vacation.at\
variables.at\
version.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
-
-
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 24acb1d..9526d7d 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -14,13 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
-DISTCLEANFILES = atconfig $(check_SCRIPTS)
-MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
-EXTRA_DIST = \
- $(TESTSUITE_AT)\
- testsuite\
+include $(srcdir)/testsuite.am
+
+DISTCLEANFILES += package.m4
+EXTRA_DIST += \
+ package.m4 \
+ package.m4.in \
testsuite.inc\
- package.m4\
+ testsuite.am\
lib\
etc\
spool\
@@ -28,22 +29,6 @@ EXTRA_DIST = \
maildir\
mh
-## ------------ ##
-## package.m4. ##
-## ------------ ##
-
-$(srcdir)/package.m4: $(top_srcdir)/configure.ac
- $(AM_V_GEN){ \
- echo '# Signature of the current package.'; \
- echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
- echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
- echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
- echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
- echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
- } >$(srcdir)/package.m4
-
-#
-
## -------------------------- ##
## Non-installable programs
## -------------------------- ##
@@ -78,7 +63,7 @@ cwdrepl_LDADD = ${MU_LIB_MAILUTILS}
## Test suite. ##
## ------------ ##
-TESTSUITE_AT = \
+TESTSUITE_AT += \
cwdrepl.at\
fldel.at\
lstuid00.at\
@@ -89,28 +74,6 @@ TESTSUITE_AT = \
mime01.at\
smtp-msg.at\
smtp-str.at\
- ufms.at\
- testsuite.at
-
-TESTSUITE = $(srcdir)/testsuite
-M4=m4
-
-AUTOTEST = $(AUTOM4TE) --language=autotest
-$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(top_srcdir)/testsuite/testsuite.inc
- $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) -I $(top_srcdir)/testsuite testsuite.at -o $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
-atconfig: $(top_builddir)/config.status
- cd $(top_builddir) && ./config.status tests/$@
-
-clean-local:
- @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
-
-check-local: atconfig atlocal $(TESTSUITE)
- @$(SHELL) $(TESTSUITE)
-
-# Run the test suite on the *installed* tree.
-#installcheck-local:
-# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
+ ufms.at
diff --git a/testsuite/cwdrepl.c b/testsuite/cwdrepl.c
index 5ffc1b7..44fcfd7 100644
--- a/testsuite/cwdrepl.c
+++ b/testsuite/cwdrepl.c
@@ -39,7 +39,7 @@ DESCRIPTION
line. Each pair instructs the tool to replace every occurrence of DIR
with REPL on output. Note that these pairs take precedence over the
default ones, so running "cwdrepl $PWD 'PWD'" will replace occurrences
- of the logical current working directory name with the string PWS, instead
+ of the logical current working directory name with the string PWD, instead
of the default dot.
*/
diff --git a/testsuite/package.m4.in b/testsuite/package.m4.in
new file mode 100644
index 0000000..e9b7de5
--- a/dev/null
+++ b/testsuite/package.m4.in
@@ -0,0 +1,7 @@
+# Signature of the current package.
+m4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])
+m4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])
+m4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])
+m4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])
+m4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])
+m4_define([MU_DEFAULT_SCHEME], [@MU_DEFAULT_SCHEME@])
diff --git a/testsuite/testsuite.am b/testsuite/testsuite.am
new file mode 100644
index 0000000..6f60dd6
--- a/dev/null
+++ b/testsuite/testsuite.am
@@ -0,0 +1,47 @@
+# This file is part of GNU Mailutils.
+# Copyright (C) 2007-2019 Free Software Foundation, Inc.
+#
+# GNU Mailutils is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 3, or (at
+# your option) any later version.
+#
+# GNU Mailutils is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+
+EXTRA_DIST = $(TESTSUITE_AT) testsuite
+DISTCLEANFILES = atconfig $(check_SCRIPTS)
+MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+
+## ------------ ##
+## Test suite. ##
+## ------------ ##
+
+TESTSUITE_AT = testsuite.at
+
+TESTSUITE = $(srcdir)/testsuite
+M4=m4
+AUTOTEST_INCLUDES=\
+ -I $(top_srcdir)/testsuite \
+ -I $(srcdir)
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): $(TESTSUITE_AT) $(top_srcdir)/testsuite/package.m4 $(top_srcdir)/testsuite/testsuite.inc
+ $(AM_V_GEN)$(AUTOTEST) $(AUTOTEST_INCLUDES) testsuite.at -o $@.tmp
+ $(AM_V_at)mv $@.tmp $@
+
+atconfig: $(top_builddir)/config.status
+ cd $(top_builddir) && ./config.status tests/$@
+
+clean-local:
+ @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
+
+check-local: atconfig atlocal $(TESTSUITE)
+ @$(SHELL) $(TESTSUITE)
+
+

Return to:

Send suggestions and report system problems to the System administrator.