summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-11-09 15:51:19 +0200
committerSergey Poznyakoff <gray@gnu.org>2019-11-09 17:14:09 +0200
commitb666b297dd3bce7fd3ccd8d350858bc2a737315f (patch)
treed98ef0fcf504a58b96a2bf9ebcfb0760aab9d907 /testsuite
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 (limited to 'testsuite')
-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
4 files changed, 64 insertions, 47 deletions
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 24acb1d1e..9526d7d73 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 5ffc1b71e..44fcfd768 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 000000000..e9b7de5e9
--- /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 000000000..6f60dd676
--- /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.