X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=Makefile.am;h=082c9c747c26bb774431209cc354a4b2fb52e324;hb=b0b7ee58c482bf36063e6158f610dd337f3ca568;hp=134063920a9a2f19a6bfdccfb47689f9b4a66bba;hpb=8ae191f927b3e294b7a50124b8c806365c4dbeb8;p=mmh diff --git a/Makefile.am b/Makefile.am index 1340639..082c9c7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,20 +33,29 @@ auxexecdir = @libdir@ ## ## nmh _does_ have a test suite! ## -testdir = $(srcdir)/test -## It might be nice to configure testinstall and testbuild -## directories, but for now they're hard-coded here and in the test -## scripts. -## And it would be easier to clean up if tests were launched from a -## tmp directory, and/or each test cleaned up after itself on -## successful completion. -##MOSTLYCLEANFILES = test/testinstall/*.actual* test/testinstall/*.expected* \ -## test/testinstall/*.replgroupcomps test/testinstall/*.draft \ -## test/testinstall/,*.draft* - -mostlyclean-local: - rm -rf test/testinstall - rm -rf test/testbuild +TESTS_ENVIRONMENT = MH_OBJ_DIR=@abs_builddir@ \ + MH_TEST_DIR=@abs_builddir@/test/testdir \ + auxexecdir=$(auxexecdir) bindir=$(bindir) \ + mandir=$(mandir) sysconfdir=$(sysconfdir) +## +## Important note: the "cleanup" test should always be last +## +TESTS = test/bad-input/test-header test/folder/test-create \ + test/folder/test-total test/format/test-localmbox \ + test/format/test-myname test/format/test-myhost \ + test/format/test-mymbox \ + test/inc/test-deb359167 test/inc/test-eom-align \ + test/manpages/test-manpages test/mhbuild/test-forw \ + test/mhpath/test-mhpath \ + test/mhshow/test-cte-binary test/mhshow/test-qp \ + test/mhshow/test-subpart test/new/test-basic test/pick/test-stderr \ + test/repl/test-if-str test/scan/test-scan \ + test/whatnow/test-attach-detach test/whatnow/test-cd \ + test/whatnow/test-ls \ + test/cleanup ## The "cleanup" test should always be last. + +check_SCRIPTS = test/common.sh +check_PROGRAMS = test/getfullname ## ## Stuff that should be cleaned via "make clean" @@ -55,7 +64,7 @@ CLEANFILES = config/version.c sbr/sigmsg.h etc/mts.conf etc/sendfiles \ etc/mhn.defaults man/man.sed $(man_MANS) clean-local: @rm -rf RPM a.out.DSYM uip/a.out.DSYM - @$(testdir)/teardown-test + @rm -rf test/testdir ## ## Stuff that should be cleaned via "make maintainer-clean" @@ -184,9 +193,9 @@ EXTRA_DIST = config/version.sh sbr/sigmsg.awk etc/mts.conf.in etc/sendfiles.in \ man/rcvpack.man man/rcvstore.man man/rcvtty.man man/refile.man \ man/repl.man man/rmf.man man/rmm.man man/scan.man man/send.man \ man/sendfiles.man man/show.man man/slocal.man man/sortm.man \ - man/unseen.man man/whatnow.man man/whom.man test/common.sh.in \ - test/README test/runalltests test/runtest test/setup-test \ - test/teardown-test test/tests + man/unseen.man man/whatnow.man man/whom.man test/README $(TESTS) \ + test/inc/deb359167.mbox test/inc/fromline.txt \ + test/inc/msgheader.txt test/inc/filler.txt test/inc/md5sums ## ## These are all of the definitions for each of the programs listed above. @@ -202,6 +211,7 @@ uip_burst_SOURCES = uip/burst.c uip_comp_SOURCES = uip/comp.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c +uip_comp_LDADD = $(LDADD) $(ICONVLIB) uip_dist_SOURCES = uip/dist.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c @@ -337,6 +347,9 @@ uip_spost_SOURCES = uip/spost.c uip/aliasbr.c uip_viamail_SOURCES = uip/viamail.c uip/mhmisc.c uip/mhoutsbr.c uip/sendsbr.c \ uip/annosbr.c uip/distsbr.c +test_getfullname_SOURCES = test/getfullname.c +test_getfullname_LDADD = + ## ## Our rebuild rules for files that aren't built via the normal mechanisms ## @@ -444,8 +457,8 @@ sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"$(sysconfdir)"' \ -DMAILSPOOL='"$(mailspool)"' \ -DSENDMAILPATH='"$(sendmailpath)"' -DNMHBINDIR='"$(bindir)"' \ -DNMHLIBDIR='"$(libdir)"' \ - -DDEFAULT_EDITOR='"$(default_editor)"' \ - -DDEFAULT_PAGER='"$(default_pager)"' + -DDEFAULT_EDITOR='"$(editorpath)"' \ + -DDEFAULT_PAGER='"$(pagerpath)"' sbr_libdtimep_a_SOURCES = sbr/dtimep.l sbr_libdtimep_a_CFLAGS = $(sbr_libmh_a_CPPFLAGS) $(DISABLE_UNUSED_MACROS_WARNING) @@ -473,8 +486,8 @@ man/man.sed: Makefile echo 's,%mandir%,$(mandir),g' >> $@ echo 's,%mailspool%,$(mailspool),g' >> $@ echo 's,%sendmailpath%,$(sendmailpath),g' >> $@ - echo 's,%default_editor%,$(default_editor),g' >> $@ - echo 's,%default_pager%,$(default_pager),g' >> $@ + echo 's,%default_editor%,$(editorpath),g' >> $@ + echo 's,%default_pager%,$(pagerpath),g' >> $@ echo 's,%manext1%,$(manext1),g' >> $@ echo 's,%manext5%,$(manext5),g' >> $@ echo 's,%manext8%,$(manext8),g' >> $@ @@ -500,10 +513,6 @@ man/man.sed: Makefile .man.$(manext8): $(SED) -f man/man.sed $< > $@ -test: all - @$(testdir)/runalltests -.PHONY: test - ## Don't include commit hashes in ChangeLog. ChangeLog: @[ -d .git ] && git --no-pager log --abbrev-commit | \