diff options
author | Eric Blake <ebb9@byu.net> | 2008-04-15 22:19:00 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-04-15 22:19:00 -0600 |
commit | 693e6ecc7448f782c2db9fc148c6876178d8b199 (patch) | |
tree | 4f457f0c41c37c5be7ed85909bc3ebf80101884d | |
parent | 404e78ea543a099810bd61e42fe5623c50cff370 (diff) | |
download | m4-693e6ecc7448f782c2db9fc148c6876178d8b199.tar.gz |
Fix 'make installcheck' after './configure --prefix-progname'.
* tests/testsuite.at (AT_CHECK_M4): Allow overriding the m4
program name.
(HELP_OTHER, PREPARE_TESTS): Document and use $M4.
* tests/builtins.at (patsubst): Avoid space-tab.
(divert, mkdtemp, mkstemp): Adjust tests to use $M4.
* tests/options.at (--debugfile): Likewise.
* tests/others.at (stdin seekable): Likewise.
(fstab): Avoid space-tab.
* Makefile.am (installcheck-local): Accomodate transformed name.
(DISTCHECK_CONFIGURE_FLAGS): Ensure no regressions, by using gm4
during 'make distcheck'.
* cfg.mk: New file, borrowed from branch.
Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | Makefile.am | 10 | ||||
-rw-r--r-- | cfg.mk | 37 | ||||
-rw-r--r-- | tests/builtins.at | 12 | ||||
-rw-r--r-- | tests/options.at | 4 | ||||
-rw-r--r-- | tests/others.at | 6 | ||||
-rw-r--r-- | tests/testsuite.at | 24 |
7 files changed, 92 insertions, 15 deletions
@@ -1,5 +1,19 @@ 2008-04-15 Eric Blake <ebb9@byu.net> + Fix 'make installcheck' after './configure --prefix-progname'. + * tests/testsuite.at (AT_CHECK_M4): Allow overriding the m4 + program name. + (HELP_OTHER, PREPARE_TESTS): Document and use $M4. + * tests/builtins.at (patsubst): Avoid space-tab. + (divert, mkdtemp, mkstemp): Adjust tests to use $M4. + * tests/options.at (--debugfile): Likewise. + * tests/others.at (stdin seekable): Likewise. + (fstab): Avoid space-tab. + * Makefile.am (installcheck-local): Accomodate transformed name. + (DISTCHECK_CONFIGURE_FLAGS): Ensure no regressions, by using gm4 + during 'make distcheck'. + * cfg.mk: New file, borrowed from branch. + Update prerequisite tools to match recent releases. * configure.ac (AC_PREREQ): Rely on released autoconf. (LT_PREREQ): Rely on released libtool. diff --git a/Makefile.am b/Makefile.am index dc4253b7..76068021 100644 --- a/Makefile.am +++ b/Makefile.am @@ -416,10 +416,16 @@ check-local: tests/atconfig tests/m4 $(TESTSUITE) $(check_LTLIBRARIES) $(SHELL) '$(srcdir)/tests/testsuite' -C tests \ $(TESTS_ENVIRONMENT) $(TESTSUITEFLAGS) -# Run the test suite on the *installed* tree. +# Run the test suite on the *installed* tree, including any renames +# the user requested. installcheck-local: tests/atconfig $(TESTSUITE) $(check_LTLIBRARIES) $(SHELL) '$(srcdir)/tests/testsuite' -C tests \ - $(TESTS_ENVIRONMENT) AUTOTEST_PATH="$(bindir)" $(TESTSUITEFLAGS) + $(TESTS_ENVIRONMENT) AUTOTEST_PATH="$(bindir)" \ + M4="`echo m4 | sed '$(program_transform_name)'`" $(TESTSUITEFLAGS) + +# Enough users install GNU M4 as gm4 that we make sure 'make installcheck' +# will handle that, as part of making a release. +DISTCHECK_CONFIGURE_FLAGS = --disable-assert --program-prefix=g # We need to remove any file droppings left behind by testsuite. clean-local-tests: @@ -0,0 +1,37 @@ +# Customize maint.mk. -*- makefile -*- +# Copyright (C) 2003-2008 Free Software Foundation, Inc. + +# This program 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 of the License, or +# (at your option) any later version. + +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +# Use alpha.gnu.org for alpha and beta releases. +# Use ftp.gnu.org for major releases. +gnu_ftp_host-alpha = alpha.gnu.org +gnu_ftp_host-beta = alpha.gnu.org +gnu_ftp_host-major = ftp.gnu.org +gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE)) + +url_dir_list = ftp://$(gnu_rel_host)/gnu/m4 + +# The GnuPG ID of the key used to sign the tarballs. +gpg_key_ID = F4850180 + +# Tests not to run as part of "make distcheck". +# Exclude changelog-check here so that there's less churn in ChangeLog +# files -- otherwise, you'd need to have the upcoming version number +# at the top of the file for each `make distcheck' run. +local-checks-to-skip = changelog-check + +# The local directory containing the checked-out copy of gnulib used in this +# release. Used solely to get gnulib's SHA1 for the "announcement" target. +gnulib_dir = $(srcdir)/../gnulib diff --git a/tests/builtins.at b/tests/builtins.at index 2feae513..2030b14e 100644 --- a/tests/builtins.at +++ b/tests/builtins.at @@ -296,7 +296,7 @@ hello world dnl Test large diversions, which were broken in m4 1.4.8-1.4.10. AT_CHECK([echo 'divert(1)hi -format(%1000000d, 1)' | m4 | sed 1q], [0], [[hi +format(%1000000d, 1)' | $M4 | sed 1q], [0], [[hi ]]) AT_DATA([in.m4], [M4_ONE_MEG_DEFN[divert(`2')f`'dnl @@ -687,9 +687,9 @@ AT_DATA([[in]], [[translit(substr(esyscmd(`ls -ld 'mkdtemp(`m4-fooXXXXXX')), `0', `10'), `SsT', `-x-') ]]) -AT_CHECK([m4 < in], [0], [[drwx------ +AT_CHECK([$M4 < in], [0], [[drwx------ ]]) -AT_CHECK([umask 700; m4 < in], [0], [[d--------- +AT_CHECK([umask 700; $M4 < in], [0], [[d--------- ]]) AT_CLEANUP @@ -721,9 +721,9 @@ dnl Check that umask has an effect AT_DATA([[in]], [[substr(esyscmd(`ls -ld 'mkstemp(`m4-fooXXXXXX')), `0', `10') ]]) -AT_CHECK([m4 < in], [0], [[-rw------- +AT_CHECK([$M4 < in], [0], [[-rw------- ]]) -AT_CHECK([umask 700; m4 < in], [0], [[---------- +AT_CHECK([umask 700; $M4 < in], [0], [[---------- ]]) dnl Check for Solaris compatibility of maketemp. Hopefully the pid is @@ -970,7 +970,7 @@ patsubst(`GNUs not Unix.', `\<\w', `\&=') patsubst(`GNUs not Unix.', `\w*', `(\&)') patsubst(`GNUs not Unix.', `\w+', `(\&)') patsubst(`GNUs not Unix.', `\w+') -patsubst(`GNUs not Unix.', `[ ]+', ` ') +patsubst(`GNUs not '` Unix.', `[ ]+', ` ') ]]) AT_DATA([[expout]], diff --git a/tests/options.at b/tests/options.at index ac41c3a5..19b8874e 100644 --- a/tests/options.at +++ b/tests/options.at @@ -1,5 +1,5 @@ # Hand crafted tests for GNU M4. -*- Autotest -*- -# Copyright (C) 2001, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2001, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is part of GNU M4. # @@ -290,7 +290,7 @@ AT_CHECK_M4([--debugfile= -tfoo -Dfoo=bar in], [0], dnl check that all tracing gets diverted to the trace file. Don't use dnl AT_CHECK_M4 on the first run, because sanitizing stderr breaks the dnl comparison with the raw data in the trace file of the second run. -AT_CHECK([m4 -b -dV in], [0], [[foo +AT_CHECK([$M4 -dV in], [0], [[foo ]], [stderr]) mv stderr expout AT_CHECK_M4([--debugfile=trace4 -dV in], [0], [[foo diff --git a/tests/others.at b/tests/others.at index 22e8b994..68d58a39 100644 --- a/tests/others.at +++ b/tests/others.at @@ -209,7 +209,7 @@ AT_CLEANUP AT_SETUP([fstab]) AT_DATA([[fstab.m4]], -[[define(`concat', `translit(``$*'', ` ')') +[[define(`concat', `translit(``$*'', ` ')') define(`fsent', `format(`%-25s %-16s nfs %-16s 0 0', `$1:$2', `$3', concat$4)') fsent(freja, /home/gevn, /home/gevn, (rw, soft, bg, grpid)) @@ -582,7 +582,7 @@ dnl Check external follow-on process, after m4exit. AT_DATA([in.m4], [[m4exit( 0)trailing data ]]) -AT_CHECK([(m4; cat) < in.m4], [0], [[trailing data +AT_CHECK([($M4; cat) < in.m4], [0], [[trailing data ]]) dnl Check external follow-on process, after fatal error. @@ -590,7 +590,7 @@ dnl We can't use AT_CHECK_M4, so we must post-process stderr ourselves. AT_DATA([in.m4], [[dnl( 0)trailing data ]]) -AT_CHECK([(m4 -EE; cat) < in.m4], [0], [[trailing data +AT_CHECK([($M4 -EE; cat) < in.m4], [0], [[trailing data ]], [stderr]) AT_CHECK([[sed 's/^[^:]*[lt-]*m4[.ex]*:/m4:/' stderr]], [0], [[m4:stdin:1: Warning: dnl: extra arguments ignored: 1 > 0 diff --git a/tests/testsuite.at b/tests/testsuite.at index 784248a9..089395e4 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -21,6 +21,26 @@ # We need a recent Autotest. m4_version_prereq([2.62]) +# Default to testing "m4 -b", but allow overrides. +dnl This uses knowledge of undocumented autotest internals; hopefully +dnl it isn't too much of a problem. FIXME: Help autoconf document +dnl proper usage of HELP_OTHER, at_write_fail, and at_tested (or better +dnl yet, add AT_FOO macros that wrap these internal details). +m4_divert_text([HELP_OTHER], +[cat <<\_ATEOF || at_write_fail=1 + +The environment variable `M4' controls which binary is tested, default `m4 -b'. +_ATEOF]) +m4_divert_text([PREPARE_TESTS], +[[if test "${M4+set}" = set; then + case $M4 in + *[\\/]* ) at_tested= ;; + * ) at_tested=`set x $M4; echo $2` ;; + esac +else + M4='m4 -b' +fi]]) + # AT_CHECK_M4(ARGS, [EXIT-STATUS = 0], [STDOUT = `'], [STDERR = `'], # [STDIN = `/dev/null']) # ------------------------------------------------------------------ @@ -47,8 +67,8 @@ m4_version_prereq([2.62]) # or m4:input.m4:7: cannot open module `no_such': can't open the module # to m4:input.m4:7: cannot open module `no_such' m4_define([AT_CHECK_M4], -[AT_CHECK([m4 -b -d $1 ]m4_if([$5], [-], [<&-], - [< m4_default([$5], [/dev/null])]), +[AT_CHECK([$M4 -d $1 ]m4_if([$5], [-], [<&-], + [< m4_default([$5], [/dev/null])]), [$2], [$3], m4_case([$4], [], [], [ignore], [ignore], [stderr])) m4_case([$4], [], [], [ignore], [], [AT_CHECK([[sed 's/^[^:]*[lt-]*m4[.ex]*:/m4:/ |