[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1-464-g51403a6 |
Date: |
Sun, 24 Jun 2012 12:38:46 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=51403a69dfa4884614465c5f3190158a91844682
The branch, ng/master has been updated
via 51403a69dfa4884614465c5f3190158a91844682 (commit)
via 57f5a614203a2bc62b0640d2296ed3c9de12958f (commit)
via 3a7149594efc4ae7cd9f2b362baecde9d94e13f5 (commit)
via 76fea2de5fa1e2f240e744ab067acb6db98480f7 (commit)
via d8024b510375dd4ea44fa15a24490c9885f722b4 (commit)
via f1e0300d38e7c79ec58a259c9c821d9469bb6c02 (commit)
via bbd39b37ac1478d34fe9724ad35ffd6de68c295e (commit)
via 9465eb2651d9af30519882c4b583acc8ce91b8bb (commit)
via edbcd8f1948b35f956bba1586d7cc2e628b98338 (commit)
via 5898641fb97b63ff62d84eed90ea7e1b2329bfe8 (commit)
via e5343765c216cd8bff74da01986e61c3fe093eb1 (commit)
via 465111cdfd1b92feaf9c6fd679cf1845c4e53083 (commit)
via d1490b591601685d3fd6313475ac5a58940d5f6b (commit)
via ca744ade0bacef9333d0ef88ef3d6e858a09d15b (commit)
via f4a04f21eededc6e0c4f621926fc7ab796680de2 (commit)
via 91251075fe9dc9e36ccad3155602d2360d192a9c (commit)
via 19c56b1d1295120cc33503dd90d218d486656d5d (commit)
via c94da9924b88684bf839d402e17ff232cbbb1c4e (commit)
via 24c1056fdb668e2076981c2250bbf6d7c8bf8f48 (commit)
via a22717dffe37f30ef2ad2c355b68c9b3b5e4b8c7 (commit)
from cf4f853ca2695a9e3cd35836cd610279fb3a6864 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 51403a69dfa4884614465c5f3190158a91844682
Merge: bbd39b3 57f5a61
Author: Stefano Lattarini <address@hidden>
Date: Sun Jun 24 10:56:46 2012 +0200
Merge branch 'master' into ng/master
* master:
tests: fix automatic re-execution of tests with Zsh
tests: drop support for older Zsh shells
tests: allow AM_TEST_RUNNER_SHELL to be overridden
tests: fix setup for older Zsh
missing: do not touch timestamps; only warn for out-of-date files
Signed-off-by: Stefano Lattarini <address@hidden>
commit bbd39b37ac1478d34fe9724ad35ffd6de68c295e
Merge: cf4f853 edbcd8f
Author: Stefano Lattarini <address@hidden>
Date: Sat Jun 23 00:42:06 2012 +0200
Merge branch 'master' into ng/master
* master:
tests: avoid one last `...` command substitution in 'test-init.sh'
maintcheck: guard against `...` for command substitution in test cases
tests: more uses of $(...) over `...` for command substitution
cosmetics: quote `like this', not 'like this', in a couple of tests
readme: clarify/extend few entries in 't/README'
readme: better separation of entries in 't/README'
readme: subsections "Do" and "Do not" in 't/README' merged
tests: new requirement 'grep-nonprint'
cosmetics: fix description of an expected error message in a test
tests: assume automake quotes 'like this', not `like this'
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
NEWS | 15 ++
defs | 10 +-
defs-static.in | 41 ++---
doc/automake-ng.texi | 69 +++++--
lib/am/distdir.am | 26 ---
lib/missing | 208 +++++---------------
m4/missing.m4 | 10 +-
syntax-checks.mk | 28 +++
t/README | 140 ++++++-------
...ssing6.sh => aclocal-autoconf-version-check.sh} | 0
t/aclocal-verbose-install.sh | 2 +-
t/add-missing.tap | 6 +-
t/ansi2knr-no-more.sh | 2 +-
t/autodist-no-duplicate.sh | 12 +-
t/autodist-subdir.sh | 6 +-
t/autodist.sh | 6 +-
t/ax/depcomp.sh | 10 +-
t/ax/tap-summary-aux.sh | 14 +-
t/ax/test-init.sh | 22 ++-
t/color.sh | 15 +-
t/color2.sh | 15 +-
t/man4.sh | 105 ----------
t/man6.sh | 4 +-
t/{missing2.sh => missing-version-mismatch.sh} | 54 +++---
t/missing.sh | 66 ------
t/missing3.sh | 43 ++---
t/missing5.sh | 64 ------
t/parallel-tests-no-color-in-log.sh | 16 +--
t/parallel-tests-reset-term.sh | 15 +--
t/perf/testsuite-recheck.sh | 2 +-
t/perf/testsuite-summary.sh | 2 +-
...sing4.sh => remake-aclocal-version-mismatch.sh} | 0
t/remake11.sh | 8 +-
t/remake6.sh | 2 +-
t/self-check-me.tap | 4 +-
t/tap-color.sh | 15 +-
t/tap-global-log.sh | 6 +-
t/txinfo30.sh | 63 ------
t/vtexi4.sh | 7 +-
39 files changed, 354 insertions(+), 779 deletions(-)
rename t/{missing6.sh => aclocal-autoconf-version-check.sh} (100%)
delete mode 100755 t/man4.sh
rename t/{missing2.sh => missing-version-mismatch.sh} (53%)
delete mode 100755 t/missing.sh
delete mode 100755 t/missing5.sh
rename t/{missing4.sh => remake-aclocal-version-mismatch.sh} (100%)
delete mode 100755 t/txinfo30.sh
diff --git a/NEWS b/NEWS
index 6df5fcd..54acc7a 100644
--- a/NEWS
+++ b/NEWS
@@ -66,6 +66,21 @@ New in 1.13:
and texi2pdf around without cluttering the build directory, and to
make it possible to run the "dvi" and "pdf" recipes in parallel.
+* Automatic remake rules and 'missing' script:
+
+ - The 'missing' script does not try anymore to update the timestamp
+ of out-of-date files that require a maintainer-specific tool to be
+ remade, in case the user lacks such a tool (or has a too-old version
+ of it). It just give a useful warning, and in some cases also a tip
+ about how to obtain such a tool.
+
+ - The missing script has thus become useless as a (poor) way to work
+ around the sketched-timestamps issues that can happen for projects
+ that keep generated files committed in their VCS repository. Such
+ projects are now encouraged to write a custom "fix-timestamps.sh"
+ script to avoid such issues; a simple example is provided in the
+ "CVS and generated files" chapter of the automake manual.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.12.2:
diff --git a/defs b/defs
index d16758c..72dcf63 100644
--- a/defs
+++ b/defs
@@ -32,8 +32,8 @@ case ${AM_TESTS_REEXEC-yes} in
;;
*)
# Ensure we can find ourselves.
- if test ! -f "$0"; then
- echo "$0: unable to find myself" >&2
+ if test ! -f "$argv0"; then
+ echo "$argv0: unable to find myself" >&2
exit 99
fi
AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
@@ -46,10 +46,10 @@ case ${AM_TESTS_REEXEC-yes} in
*x*) opts=-x;;
*) opts=;;
esac
- echo exec $AM_TEST_RUNNER_SHELL $opts "$0" "$*"
- exec $AM_TEST_RUNNER_SHELL $opts "$0" ${1+"$@"}
+ echo exec $AM_TEST_RUNNER_SHELL $opts "$argv0" "$*"
+ exec $AM_TEST_RUNNER_SHELL $opts "$argv0" ${1+"$@"}
# This should be dead code, unless some strange error happened.
- echo "$0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
+ echo "$argv0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
exit 99
;;
esac
diff --git a/defs-static.in b/defs-static.in
index 1dfd8d3..da5dcff 100644
--- a/defs-static.in
+++ b/defs-static.in
@@ -31,35 +31,22 @@ DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
- # If Zsh is not started directly in Bourne-compatibility mode, it has
- # some incompatibilities in the handling of $0 that conflict with
- # our usage: i.e., $0 inside a file sourced with the '.' builtin is
- # temporarily set to the name of the sourced file.
- # Work around this when possible, otherwise abort the script.
+ # If Zsh is not started directly in POSIX-compatibility mode, it has some
+ # incompatibilities in the handling of $0 that conflict with our usage;
+ # i.e., $0 inside a file sourced with the '.' builtin is temporarily set
+ # to the name of the sourced file. Work around that.
# Note that a bug in some versions of Zsh prevents us from resetting $0
# in a sourced script, so the use of $argv0. For more info see:
- # <http://www.zsh.org/mla/workers/2009/msg01140.html>
- # Note: the apparently useless 'eval' below are needed by at least
- # dash 0.5.2, to prevent it from bailing out with an error like
- # "Syntax error: Bad substitution"
- if eval '[[ "$0" = *."test" ]]'; then
- # Good, FUNCTION_ARGZERO option was already off when this file was
- # sourced. Thus we've nothing to do.
- argv0=$0
- elif eval 'test -n "${functrace[-1]}"'; then
- # FUNCTION_ARGZERO option was on, but we have a easy workaround.
- eval 'argv0=${functrace[-1]%:*}'
- else
- # Give up.
- echo "$0: cannot determine the path of running test script" >&2
- echo "$0: test was running with Zsh version $ZSH_VERSION" >&2
- echo "$0: did you enable the NO_FUNCTION_ARGZERO option?" >&2
+ # <http://www.zsh.org/mla/workers/2009/msg01140.html>
+ # The apparently useless 'eval' here is needed by at least dash 0.5.2,
+ # to prevent it from bailing out with an error like:
+ # "Syntax error: Bad substitution".
+ eval 'argv0=${functrace[-1]%:*}' && test -f "$argv0" || {
+ echo "Cannot determine the path of running test script." >&2
+ echo "Your Zsh (version $ZSH_VERSION) is probably too old." >&2
exit 99
- fi
+ }
else
argv0=$0
# Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
@@ -140,8 +127,8 @@ build_alias=${build_alias-'@build_alias@'}; export
build_alias
# The shell we use to run our own test scripts, determined at configure
# time. It is required in the self tests, and most importantly for the
-# the automatic re-execution of test scripts.
-AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'
+# automatic re-execution of test scripts.
+AM_TEST_RUNNER_SHELL=${AM_TEST_RUNNER_SHELL-'@AM_TEST_RUNNER_SHELL@'}
# Make sure we override the user shell. And do not read the value of
# $SHELL from the environment (think to the non-uncommon situation where
diff --git a/doc/automake-ng.texi b/doc/automake-ng.texi
index 8059571..9626b1a 100644
--- a/doc/automake-ng.texi
+++ b/doc/automake-ng.texi
@@ -2306,9 +2306,9 @@ a file and prints some date information about it.
@item missing
This wraps a number of programs that are typically only required by
-maintainers. If the program in question doesn't exist,
address@hidden prints an informative warning and attempts to fix
-things so that the build can continue.
+maintainers. If the program in question doesn't exist, or seems to old,
address@hidden will print an informative warning before failing out,
+to provide the user with more context and information.
@item py-compile
This is used to byte-compile Python scripts.
@@ -11423,12 +11423,12 @@ lists.
Packages made with Autoconf and Automake ship with some generated
files like @file{configure} or @file{Makefile.in}. These files were
-generated on the developer's host and are distributed so that
+generated on the developer's machine and are distributed so that
end-users do not have to install the maintainer tools required to
rebuild them. Other generated files like Lex scanners, Yacc parsers,
or Info documentation, are usually distributed on similar grounds.
-Automake outputs rules in @file{Makefile}s to rebuild these files. For
+Automake output rules in @file{Makefile}s to rebuild these files. For
instance, @command{make} will run @command{autoconf} to rebuild
@file{configure} whenever @file{configure.ac} is changed. This makes
development safer by ensuring a @file{configure} is never out-of-date
@@ -11491,10 +11491,41 @@ If users use @command{cvs update} to update their
copy, instead of
inaccurate. Some rebuild rules will be triggered and attempt to
run developer tools such as @command{autoconf} or @command{automake}.
-Actually, calls to such tools are all wrapped into a call to the
address@hidden script discussed later (@pxref{maintainer-mode}).
address@hidden will take care of fixing the timestamps when these
-tools are not installed, so that the build can continue.
+Calls to such tools are all wrapped into a call to the @command{missing}
+script discussed later (@pxref{maintainer-mode}), so that the user will
+see more descriptive warnings about missing or out-of-date tools, and
+possible suggestions about how to obtain them, rather than just some
+``command not found'' error, or (worse) some obscure message from some
+older version of the required tool they happen to have installed.
+
+Maintainers interested in keeping their package buildable from a CVS
+checkout even for those users that lack maintainer-specific tools might
+want to provide an helper script (or to enhance their existing bootstrap
+script) to fix the timestamps after a
address@hidden update} or a @command{git checkout}, to prevent spurious
+rebuilds. In case of a project committing the Autotools-generated
+files, as well as the generated @file{.info} files, such script might
+look something like this:
+
address@hidden
+#!/bin/sh
+# fix-timestamp.sh: prevents useless rebuilds after "cvs update"
+sleep 1
+# aclocal-generated aclocal.m4 depends on locally-installed
+# '.m4' macro files, as well as on 'configure.ac'
+touch aclocal.m4
+sleep 1
+# autoconf-generated configure depends on aclocal.m4 and on
+# configure.ac
+configure config.h.in
+# so does autoheader-generated config.h.in
+configure config.h.in
+# and all the automake-generated Makefile.in files
+touch `find . -name Makefile.in -print`
+# finally, the makeinfo-generated '.info' files depend on the
+# corresponding '.texi' files
+touch doc/*.info
address@hidden smallexample
@item
In distributed development, developers are likely to have different
@@ -11591,20 +11622,20 @@ tools shouldn't be required during a user build and
they are not
checked for in @file{configure}.
However, if for some reason a rebuild rule is triggered and involves a
-missing tool, @command{missing} will notice it and warn the user.
-Besides the warning, when a tool is missing, @command{missing} will
-attempt to fix timestamps in a way that allows the build to continue.
-For instance, @command{missing} will touch @file{configure} if
address@hidden is not installed. When all distributed files are
-kept under version control, this feature of @command{missing} allows a
-user @emph{with no maintainer tools} to build a package off its version
-control repository, bypassing any timestamp inconsistency (implied by
-e.g.@: @samp{cvs update} or @samp{git clone}).
+missing tool, @command{missing} will notice it and warn the user, even
+suggesting how to obtain such a tool (at least in case it is a well-known
+one, like @command{makeinfo} or @command{bison}). This is more helpful
+and user-friendly than just having the rebuild rules spewing out a terse
+error message like @samp{sh: @var{tool}: command not found}. Similarly,
address@hidden will warn the user if it detects that a maintainer
+tool it attempted to use seems too old (be warned that diagnosing this
+correctly is typically more difficult that detecting missing tools, and
+requires cooperation from the tool itself, so it won't always work).
If the required tool is installed, @command{missing} will run it and
won't attempt to continue after failures. This is correct during
development: developers love fixing failures. However, users with
-wrong versions of maintainer tools may get an error when the rebuild
+missing or too old maintainer tools may get an error when the rebuild
rule is spuriously triggered, halting the build. This failure to let
the build continue is one of the arguments of the
@code{AM_MAINTAINER_MODE} advocates.
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 51cd80a..69c5520 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -140,32 +140,6 @@ if %?CK-NEWS%
endif %?CK-NEWS%
endif %?TOPDIR_P%
##
-## 'missing help2man' may have created some bogus man pages. Ensure they
-## are not distributed.
-##
-if %?INSTALL-MAN%
-if %?HAVE-MANS%
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-## Note that we check existing man pages here only. If there are man pages
-## which are not distributed, and may be generated only conditionally, then
-## we should not error out because of them. This could be refined to take
-## into account only dist_*_MANS, but then we'd be missing out on those
-## the user distributes with EXTRA_DIST.
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list
>/dev/null; then \
- echo "error: found man pages containing the 'missing help2man'
replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list |
sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate
the man pages;" >&2; \
- echo " typically 'make maintainer-clean' will remove them"
>&2; \
- exit 1; \
- else :; fi; \
- else :; fi
-endif %?HAVE-MANS%
-endif %?INSTALL-MAN%
-##
## Only for the top dir.
##
if %?TOPDIR_P%
diff --git a/lib/missing b/lib/missing
index be44a62..a65c9b6 100755
--- a/lib/missing
+++ b/lib/missing
@@ -1,10 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2012-06-02.10; # UTC
+scriptversion=2012-06-24.10; # UTC
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <address@hidden>, 1996.
+# Originally written by Fran,cois Pinard <address@hidden>, 1996.
# 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
@@ -29,55 +29,30 @@ if test $# -eq 0; then
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
configure_ac=configure.ac
-msg="missing on your system"
-
case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file 'aclocal.m4'
- autoconf touch file 'configure'
- autoheader touch file 'config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all 'Makefile.in' files
- bison create 'y.tab.[ch]', if possible, from existing .[ch]
- flex create 'lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create 'lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- yacc create 'y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
@@ -92,51 +67,53 @@ Send bug reports to <address@hidden>."
;;
-*)
- echo 1>&2 "$0: Unknown '$1' option"
+ echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+# Normalize program name to check for.
program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running '$TOOL --version' or '$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
+# advise the user how to get it.
case $program in
+
aclocal*)
echo 1>&2 "\
WARNING: '$1' is $msg. You should only need it if
you modified 'acinclude.m4' or '${configure_ac}'. You might want
to install the Automake and Perl packages. Grab them from
any GNU archive site."
- touch aclocal.m4
;;
autoconf*)
@@ -145,7 +122,6 @@ WARNING: '$1' is $msg. You should only need it if
you modified '${configure_ac}'. You might want to install the
Autoconf and GNU m4 packages. Grab them from any GNU
archive site."
- touch configure
;;
autoheader*)
@@ -154,19 +130,6 @@ WARNING: '$1' is $msg. You should only need it if
you modified 'acconfig.h' or '${configure_ac}'. You might want
to install the Autoconf and GNU m4 packages. Grab them
from any GNU archive site."
- files=`sed -n -e 's/^[ ]*AC_CONFIG_HEADER(\([^)]*\)).*/\1/p' \
- -e 's/^[ ]*AC_CONFIG_HEADERS(\([^)]*\)).*/\1/p' \
- ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
;;
automake*)
@@ -175,9 +138,6 @@ WARNING: '$1' is $msg. You should only need it if
you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'.
You might want to install the Automake and Perl packages.
Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
;;
autom4te*)
@@ -187,20 +147,6 @@ WARNING: '$1' is needed, but is $msg.
proper tools for further handling them.
You can get '$1' as part of Autoconf from any GNU
archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
;;
bison*|yacc*)
@@ -209,28 +155,6 @@ WARNING: '$1' $msg. You should only need it if
you modified a '.y' file. You may need the Bison package
in order for those modifications to take effect. You can get
Bison from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
;;
lex*|flex*)
@@ -239,21 +163,6 @@ WARNING: '$1' is $msg. You should only need it if
you modified a '.l' file. You may need the Flex package
in order for those modifications to take effect. You can get
Flex from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG=\${$#}
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
;;
help2man*)
@@ -262,16 +171,6 @@ WARNING: '$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
Help2man package in order for those modifications to take
effect. You can get Help2man from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
;;
makeinfo*)
@@ -282,25 +181,6 @@ WARNING: '$1' is $msg. You should only need it if
call might also be the consequence of using a buggy 'make' (AIX,
DU, IRIX). You might want to install the Texinfo package or
the GNU make package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /address@hidden/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
;;
*)
@@ -311,11 +191,13 @@ WARNING: '$1' is needed, and is $msg.
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing '$1' program."
- exit 1
;;
+
esac
-exit 0
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/m4/missing.m4 b/m4/missing.m4
index e124803..2de7fe4 100644
--- a/m4/missing.m4
+++ b/m4/missing.m4
@@ -6,7 +6,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
+# serial 8
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -18,8 +18,8 @@ AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
@@ -32,8 +32,8 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 8f3c4b7..4c6698f 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -70,6 +70,7 @@ sc_make_simple_include \
sc_tests_make_simple_include \
sc_tests_obsolete_variables \
sc_tests_here_document_format \
+sc_tests_command_subst \
sc_tests_Exit_not_exit \
sc_tests_automake_fails \
sc_tests_required_after_defs \
@@ -451,6 +452,33 @@ sc_tests_here_document_format:
exit 1; \
fi
+## Our test case should use the $(...) POSIX form for command substitution,
+## rather than the older `...` form.
+## The point of ignoring text on here-documents is that we want to exempt
+## Makefile.am rules, configure.ac code and helper shell script created and
+## used by out shell scripts, because Autoconf (as of version 2.69) does not
+## yet ensure that $CONFIG_SHELL will be set to a proper POSIX shell.
+sc_tests_command_subst:
+ @found=false; \
+ scan () { \
+ sed -n -e '/^#/d' \
+ -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \
+ -e 's/\\`/\\{backtick}/' \
+ -e "s/[^\\]'\([^']*\`[^']*\)*'/'{quoted-text}'/g" \
+ -e '/`/p' $$*; \
+ }; \
+ for file in $(xtests); do \
+ res=`scan $$file`; \
+ if test -n "$$res"; then \
+ echo "$$file:$$res"; \
+ found=true; \
+ fi; \
+ done; \
+ if $$found; then \
+ echo 'Use $$(...), not `...`, for command substitutions.' >&2; \
+ exit 1; \
+ fi
+
## Tests should never call exit directly, but use Exit.
## This is so that the exit status is transported correctly across the 0 trap.
## Ignore comments and our testsuite's own self tests.
diff --git a/t/README b/t/README
index 1d630c0..dd8d0ee 100644
--- a/t/README
+++ b/t/README
@@ -104,23 +104,10 @@ Supported shells
to run the test(s) through the makefile test driver.
The test scripts are written with portability in mind, so that they
- should run with any decent Bourne-compatible shell.
-
- However, some care must be used with Zsh, since, when not directly
- started in Bourne-compatibility mode, it has some incompatibilities
- in the handling of $0 which conflict with our usage. Our testsuite
- can automatically work around these incompatibilities when a version
- 4.3 or later of Zsh is used, but unfortunately not when an older
- version of Zsh is used. Thus, if you want to run a test script, say
- 'foo.sh', with Zsh 4.2, you *can't* simply do "zsh foo.sh", but
- you *must* resort to:
-
- AM_TESTS_REEXEC=no zsh -o no_function_argzero foo.sh
-
- Note that this problem does not occur if Zsh is executed through
- a symlink with a basename of 'sh', since in that case Zsh starts
- in Bourne compatibility mode. So you should be perfectly safe
- when /bin/sh is Zsh, even a it's version < 4.3.
+ should run with any decent Bourne-compatible shell. However, it is
+ worth nothing that older versions of Zsh (pre-4.3) exhibited several
+ bugs and incompatibilities with our uses, and are thus not supported
+ for running Automake's test scripts.
Reporting failures
@@ -136,63 +123,63 @@ Reporting failures
Writing test cases
==================
-
-Do
---
-
- If you plan to fix a bug, write the test case first. This way you'll
+* If you plan to fix a bug, write the test case first. This way you'll
make sure the test catches the bug, and that it succeeds once you have
fixed the bug.
- Add a copyright/license paragraph.
+* Add a copyright/license paragraph.
- Explain what the test does.
+* Explain what the test does, i.e., which features it checks, which
+ invariants it verifies, or what bugs/issues it guard against.
- Cite the PR number (if any), and the original reporter (if any), so
+* Cite the PR number (if any), and the original reporter (if any), so
we can find or ask for information if needed.
- If a test checks examples or idioms given in the documentation, make
- sure the documentation reference them appropriately in comments, as in:
+* If a test checks examples or idioms given in the documentation, make
+ sure the documentation reference them appropriately in comments, as
+ with:
+
@c Keep in sync with autodist-config-headers.sh
@example
...
@end example
- Use "required=..." for required tools. Do not explicitly require
+* Use "required=..." for required tools. Do not explicitly require
tools which can be taken for granted because they're listed in the
GNU Coding Standards (for example, 'gzip').
- Include ./defs in every test script (see existing tests for examples
+* Include ./defs in every test script (see existing tests for examples
of how to do this).
- Use the 'skip_' function to skip tests, with a meaningful message if
+* Use the 'skip_' function to skip tests, with a meaningful message if
possible. Where convenient, use the 'warn_' function to print generic
warnings, the 'fail_' function for test failures, and the 'fatal_'
function for hard errors. In case a hard error is due to a failed
set-up of a test scenario, you can use the 'framework_fail_' function
instead.
- For those tests checking the Automake-provided test harnesses that are
- expected to work also when the 'serial-tests' Automake option is used
- (thus causing the serial testsuite harness to be used in the generated
- Makefile), place a line containing "try-with-serial-tests" somewhere
- in the file. That will ensure that the 'gen-testsuite-part' script
- generates a sibling of that test which uses the serial harness instead
- of the parallel one. For those tests that are *not* meant to work with
- the parallel testsuite harness at all (these should be very very few),
+* For those tests checking the Automake-provided test harnesses that
+ are expected to work also when the 'serial-tests' Automake option
+ is used (thus causing the serial testsuite harness to be used in the
+ generated Makefile), place a line containing "try-with-serial-tests"
+ somewhere in the file (usually in a comment).
+ That will ensure that the 'gen-testsuite-part' script generates a
+ sibling of that test which uses the serial harness instead of the
+ parallel one. For those tests that are *not* meant to work with the
+ parallel testsuite harness at all (these should be very very few),
set the shell variable 'am_serial_tests' to "yes" before including
./defs.
- Some tests in the Automake-NG testsuite are auto-generated; those tests
- might have custom extensions, but their basename (that is, with such
- extension stripped) is expected to end with "-w" string, optionally
- followed by decimal digits. For example, the name of a valid
- auto-generated test can be 'color-w.sh' or 'tap-signal-w09.tap'.
+* Some tests in the Automake-NG testsuite are auto-generated; those
+ tests might have custom extensions, but their basename (that is,
+ with such extension stripped) is expected to end with "-w" string,
+ optionally followed by decimal digits. For example, the name of a
+ valid auto-generated test can be 'color-w.sh' or 'tap-signal-w09.tap'.
Please don't name hand-written tests in a way that could cause them
- to be confused with auto-generated tests; for example, 'u-v-w.sh'
- or 'option-w0.tap' are *not* valid name for hand-written tests.
+ to be confused with auto-generated tests; for example, 'u-v-w.sh' or
+ 'option-w0.tap' are *not* valid name for hand-written tests.
- ./defs brings in some commonly required files, and sets a skeleton
+* ./defs brings in some commonly required files, and sets a skeleton
configure.ac. If possible, append to this file. In some cases
you'll have to overwrite it, but this should be the exception. Note
that configure.ac registers Makefile.in but do not output anything by
@@ -201,83 +188,85 @@ Do
test directory (which is a rare occurrence), set the 'am_create_testdir'
shell variable to "empty" before sourcing ./defs.
- By default, the testcases are run with the errexit shell flag on,
+* By default, the testcases are run with the errexit shell flag on,
to make it easier to catch failures you might not have thought of.
If this is undesirable in some testcase, you can use "set +e" to
disable the errexit flag (but please do so only if you have a very
good reason).
- End the test script with a ":" or "Exit 0". Otherwise, when somebody
+* End the test script with a ':' command. Otherwise, when somebody
changes the test by adding a failing command after the last command,
- the test will spuriously fail because $? is nonzero at the end. Note
- that this is relevant even if the errexit shell flag is on, in case
- the test contains commands like "grep ... Makefile.in && Exit 1" (and
- there are indeed a lot of such tests).
+ the test will spuriously fail because '$?' is nonzero at the end.
+ Note that this is relevant even if the errexit shell flag is on, in
+ case the test contains commands like "grep ... Makefile.in && Exit 1"
+ (and there are indeed a lot of such tests).
- Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER,
+* Use $ACLOCAL, $AUTOMAKE, $AUTOCONF, $AUTOUPDATE, $AUTOHEADER,
$PERL, $MAKE, $EGREP, and $FGREP, instead of the corresponding
commands.
- Use $sleep when you have to make sure that some file is newer
+* Use '$sleep' when you have to make sure that some file is newer
than another.
- Use cat or grep or similar commands to display (part of) files that
+* Use cat or grep or similar commands to display (part of) files that
may be interesting for debugging, so that when a user send a verbose
output we don't have to ask him for more details. Display stderr
output on the stderr file descriptor. If some redirected command is
likely to fail, display its output even in the failure case, before
exiting.
- Use 'Exit' rather than 'exit' to abort for leave early from a test
+* Use 'Exit' rather than 'exit' to abort for leave early from a test
case.
- Use '$PATH_SEPARATOR', not hard-coded ':', as the separator of
+* Use '$PATH_SEPARATOR', not hard-coded ':', as the separator of
PATH's entries.
- It's more important to make sure that a feature works, than make sure
+* It's more important to make sure that a feature works, than make sure
that the output of Automake-NG looks correct. It might look correct
and still fail to work. In other words, prefer running 'make' over
grepping Makefile.in (or do both).
- If you run $ACLOCAL, $AUTOMAKE or $AUTOCONF several times in the
+* If you run $ACLOCAL, $AUTOMAKE or $AUTOCONF several times in the
same test and change configure.ac by the meantime, do
+
rm -rf autom4te*.cache
+
before the following runs. On fast machines the new configure.ac
could otherwise have the same timestamp as the old autom4te.cache.
- Use filenames with two consecutive spaces when testing that some
+* Use filenames with two consecutive spaces when testing that some
code preserves filenames with spaces. This will catch errors like
`echo $filename | ...`.
- Make sure your test script can be used to faithfully check an
- installed version of Automake-ng (as with "make installcheck"). For
- example, if you need to copy or grep an Automake-ng provided script,
+* Make sure your test script can be used to faithfully check an
+ installed version of Automake-NG (as with "make installcheck"). For
+ example, if you need to copy or grep an Automake-NG provided script,
do not assume that they can be found in the '$top_srcdir/lib'
directory, but use '$am_scriptdir' instead. The complete list of
such "$am_...dir" variables can be found in the 'defs-static.in'
file.
- When writing input for lex, include the following in the definitions
+* When writing input for lex, include the following in the definitions
section:
+
%{
#define YY_NO_UNISTD_H 1
%}
+
to accommodate non-ANSI systems, since GNU flex generates code that
includes unistd.h otherwise. Also add:
+
int isatty (int fd) { return 0; }
+
to the definitions section if the generated code is to be compiled
by a C++ compiler, for similar reasons (i.e., the isatty(3) function
from that same unistd.h header would be required otherwise).
- Before commit: make sure the test is executable, add the tests to
+* Before commit: make sure the test is executable, add the tests to
TESTS in Makefile.am, add it to XFAIL_TESTS in addition if needed,
write a ChangeLog entry, send the diff to <address@hidden>.
-
-Do not
-------
-
- In test scripts, prefer using POSIX constructs over their old
+* In test scripts, prefer using POSIX constructs over their old
Bourne-only equivalents:
- use $(...), not `...`, for command substitution;
@@ -288,22 +277,21 @@ Do not
- prefer use of ${param%pattern} and ${param#pattern} parameter
expansions over processing by 'sed' or 'expr'.
- Note however that, when writing Makefile recipes or shell code in a
+* Note however that, when writing Makefile recipes or shell code in a
configure.ac, you should still use `...` instead, because the Autoconf
generated configure scripts do not ensure they will find a truly POSIX
shell (even though they will prefer and use it *if* it's found).
- Do not test an Automake error with "$AUTOMAKE && Exit 1", or in three
+* Do not test an Automake error with "$AUTOMAKE && Exit 1", or in three
years we'll discover that this test failed for some other bogus reason.
This happened many times. Better use something like
- Do not test an Automake-NG error with "$AUTOMAKE && Exit 1", or in
+* Do not test an Automake-NG error with "$AUTOMAKE && Exit 1", or in
three years we'll discover that this test failed for some other bogus
reason. This happened many times. Better use something like
AUTOMAKE_fails
grep 'expected diagnostic' stderr
- (Note this doesn't prevent the test from failing for another
- reason, but at least it makes sure the original error is still
- here.)
+ Note this doesn't prevent the test from failing for another reason,
+ but at least it makes sure the original error is still here.
diff --git a/t/missing6.sh b/t/aclocal-autoconf-version-check.sh
similarity index 100%
rename from t/missing6.sh
rename to t/aclocal-autoconf-version-check.sh
diff --git a/t/aclocal-verbose-install.sh b/t/aclocal-verbose-install.sh
index 594c607..095a3f7 100755
--- a/t/aclocal-verbose-install.sh
+++ b/t/aclocal-verbose-install.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check verbose messages by `aclocal --install'.
+# Check verbose messages by 'aclocal --install'.
am_create_testdir=empty
. ./defs || Exit 1
diff --git a/t/add-missing.tap b/t/add-missing.tap
index 6f16a0a..902ff3b 100755
--- a/t/add-missing.tap
+++ b/t/add-missing.tap
@@ -169,11 +169,11 @@ check_ ()
for f in $files; do
command_ok_ \
"$pfx warn about missing file $f" \
- grep "required file ['\`]$build_aux/$f' not found" stderr
+ $FGREP "required file '$build_aux/$f' not found" stderr
# Suggest the user to use '--add-missing'.
command_ok_ \
"$pfx suggest --add-missing for $f" \
- grep ".*--add-missing.* install .*$f" stderr
+ grep ".*--add-missing.* install .*'$f'" stderr
done
# No files should be automatically installed by automake if it
# is not told to.
@@ -192,7 +192,7 @@ check_ ()
for f in $files; do
command_ok_ \
"$pfx report installation of $f" \
- grep ": installing ['\`]$build_aux/$f'$" stderr
+ $FGREP ": installing '$build_aux/$f'" stderr
done
# Only the expected files should be installed. But automake always
# require 'missing' and 'install-sh', so account for them.
diff --git a/t/ansi2knr-no-more.sh b/t/ansi2knr-no-more.sh
index fb2e2a5..99f2e92 100755
--- a/t/ansi2knr-no-more.sh
+++ b/t/ansi2knr-no-more.sh
@@ -45,7 +45,7 @@ for opt in ansi2knr lib/ansi2knr; do
AUTOMAKE_fails -Wnone
grep "^Makefile\.am:1:.*$warn_rx" stderr
# ansi2knr option in configure.ac
- echo > Makefile.am # `echo', not `:', for Solaris /bin/sh.
+ echo > Makefile.am # 'echo', not ':', for Solaris /bin/sh.
sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" configure.sav >configure.ac
cat configure.ac # For debugging.
rm -rf autom4te*.cache
diff --git a/t/autodist-no-duplicate.sh b/t/autodist-no-duplicate.sh
index 2e610ae..0055e4c 100755
--- a/t/autodist-no-duplicate.sh
+++ b/t/autodist-no-duplicate.sh
@@ -24,14 +24,14 @@ re='Files .*automatically distributed.*if found'
# The automake manual states that the list of automatically-distributed
# files should be given by 'automake --help'.
-list1=`$AUTOMAKE --help \
- | sed -n "/^$re.*always/,/^ *$/p" \
- | sed 1d`
+list1=$($AUTOMAKE --help \
+ | sed -n "/^$re.*always/,/^ *$/p" \
+ | sed 1d)
list1=$(echo $list1)
-list2=`$AUTOMAKE --help \
- | sed -n "/^$re.*under certain conditions/,/^ *$/p" \
- | sed 1d`
+list2=$($AUTOMAKE --help \
+ | sed -n "/^$re.*under certain conditions/,/^ *$/p" \
+ | sed 1d)
list2=$(echo $list2)
test -n "$list1"
diff --git a/t/autodist-subdir.sh b/t/autodist-subdir.sh
index ff06363..fbb7523 100755
--- a/t/autodist-subdir.sh
+++ b/t/autodist-subdir.sh
@@ -36,9 +36,9 @@ $AUTOCONF
# The automake manual states that the list of automatically-distributed
# files should be given by 'automake --help'.
-list=`$AUTOMAKE --help \
- | sed -n '/^Files.*automatically distributed.*if found.*always/,/^
*$/p' \
- | sed 1d`
+list=$($AUTOMAKE --help \
+ | sed -n '/^Files.*automatically distributed.*if found.*always/,/^
*$/p' \
+ | sed 1d)
# Normalize whitespace, just in case.
list=$(echo $list)
diff --git a/t/autodist.sh b/t/autodist.sh
index 52dd9bc..1c8fd7d 100755
--- a/t/autodist.sh
+++ b/t/autodist.sh
@@ -35,9 +35,9 @@ $AUTOCONF
# The automake manual states that the list of automatically-distributed
# files should be given by 'automake --help'.
-list=`$AUTOMAKE --help \
- | sed -n '/^Files.*automatically distributed.*if found.*always/,/^
*$/p' \
- | sed 1d`
+list=$($AUTOMAKE --help \
+ | sed -n '/^Files.*automatically distributed.*if found.*always/,/^
*$/p' \
+ | sed 1d)
# Normalize whitespace, just in case.
list=$(echo $list)
diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh
index 246313b..5886691 100644
--- a/t/ax/depcomp.sh
+++ b/t/ax/depcomp.sh
@@ -134,11 +134,11 @@ AM_INIT_AUTOMAKE
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_AR
-`if test $depcomp_with_libtool = yes; then
- echo AC_PROG_LIBTOOL
-else
- echo AC_PROG_RANLIB
-fi`
+$(if test $depcomp_with_libtool = yes; then
+ echo AC_PROG_LIBTOOL
+ else
+ echo AC_PROG_RANLIB
+ fi)
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
END
diff --git a/t/ax/tap-summary-aux.sh b/t/ax/tap-summary-aux.sh
index b43989e..5003448 100644
--- a/t/ax/tap-summary-aux.sh
+++ b/t/ax/tap-summary-aux.sh
@@ -82,13 +82,13 @@ do_check ()
}
if test $use_colors = yes; then
- red='[0;31m'
- grn='[0;32m'
- lgn='[1;32m'
- blu='[1;34m'
- mgn='[0;35m'
- brg='[1m'
- std='[m'
+ red="$esc[0;31m"
+ grn="$esc[0;32m"
+ lgn="$esc[1;32m"
+ blu="$esc[1;34m"
+ mgn="$esc[0;35m"
+ brg="$esc[1m"
+ std="$esc[m"
echo AUTOMAKE_OPTIONS = color-tests >> Makefile.am
else
red= grn= lgn= blu= mgn= brg= std=
diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh
index d19d352..ba3c1e6 100644
--- a/t/ax/test-init.sh
+++ b/t/ax/test-init.sh
@@ -26,10 +26,13 @@ set -e
# Test scripts can override it if they need to (but this should
# be done carefully).
if test -z "$me"; then
- # Guard against failure to spawn sed (seen on MSYS), or empty $argv0.
- me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.sh$//;s/\.tap$//'` \
- && test -n "$me" \
- || { echo "$argv0: failed to define \$me" >&2; exit 99; }
+ # Strip all directory components.
+ me=${argv0##*/}
+ # Strip test suffix.
+ case $me in
+ *.tap) me=${me%.tap};;
+ *.sh) me=${me%.sh} ;;
+ esac
fi
@@ -63,6 +66,8 @@ tab=' '
# A newline character.
nl='
'
+# A literal escape character. Used by test checking colored output.
+esc=''
# As autoconf-generated configure scripts do, ensure that IFS
# is defined initially, so that saving and restoring $IFS works.
@@ -630,6 +635,15 @@ do
*) FC=$F77 FCFLAGS=$FFLAGS; export FC FCFLAGS;;
esac
;;
+ grep-nonprint)
+ # Check that grep can parse nonprinting characters correctly.
+ # BSD 'grep' works from a pipe, but not a seekable file.
+ # GNU or BSD 'grep -a' works on files, but is not portable.
+ case $(echo "$esc" | grep .)$(echo "$esc" | grep "$esc") in
+ "$esc$esc") ;;
+ *) skip_ "grep can't handle nonprinting characters correctly";;
+ esac
+ ;;
javac)
# The Java compiler from JDK 1.5 (and presumably earlier versions)
# cannot handle the '-version' option by itself: it bails out
diff --git a/t/color.sh b/t/color.sh
index 66f3493..9e4ac04 100755
--- a/t/color.sh
+++ b/t/color.sh
@@ -17,10 +17,10 @@
# Test Automake TESTS color output, by forcing it.
# Keep this in sync with the sister test 'color2.test'.
+required='grep-nonprint'
# For gen-testsuite-part: ==> try-with-serial-tests <==
. ./defs || Exit 1
-esc=''
# Escape '[' for grep, below.
red="$esc\[0;31m"
grn="$esc\[0;32m"
@@ -29,14 +29,6 @@ blu="$esc\[1;34m"
mgn="$esc\[0;35m"
std="$esc\[m"
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case $(echo "$std" | grep .) in
- "$std") ;;
- *) skip_ "grep can't parse nonprinting characters";;
-esac
-
cat >>configure.ac <<END
AC_OUTPUT
END
@@ -78,7 +70,8 @@ $AUTOMAKE --add-missing
test_color ()
{
- # Not a useless use of cat; see above comments about grep.
+ # Not a useless use of cat; see above comments "grep-nonprinting"
+ # requirement in 'test-init.sh'.
cat stdout | grep "^${grn}PASS${std}: .*pass"
cat stdout | grep "^${red}FAIL${std}: .*fail"
cat stdout | grep "^${blu}SKIP${std}: .*skip"
@@ -96,6 +89,8 @@ test_color ()
test_no_color ()
{
+ # Not a useless use of cat; see above comments "grep-nonprinting"
+ # requirement in 'test-init.sh'.
cat stdout | grep "$esc" && Exit 1
:
}
diff --git a/t/color2.sh b/t/color2.sh
index 406b7e5..841c585 100755
--- a/t/color2.sh
+++ b/t/color2.sh
@@ -17,10 +17,10 @@
# Test Automake TESTS color output, using the expect(1) program.
# Keep this in sync with the sister test 'color.test'.
+required='grep-nonprint'
# For gen-testsuite-part: ==> try-with-serial-tests <==
. ./defs || Exit 1
-esc=''
# Escape '[' for grep, below.
red="$esc\[0;31m"
grn="$esc\[0;32m"
@@ -29,14 +29,6 @@ blu="$esc\[1;34m"
mgn="$esc\[0;35m"
std="$esc\[m"
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case $(echo "$std" | grep .) in
- "$std") ;;
- *) skip_ "grep can't parse nonprinting characters";;
-esac
-
# This test requires a working a working 'expect' program.
# Creative quoting required to avoid spurious maintainer-check failure.
(set +e; expect -c 'exit ''77'; test $? -eq 77) \
@@ -85,7 +77,8 @@ $AUTOMAKE --add-missing
test_color ()
{
- # Not a useless use of cat; see above comments about grep.
+ # Not a useless use of cat; see above comments "grep-nonprinting"
+ # requirement in 'test-init.sh'.
cat stdout | grep "^${grn}PASS${std}: .*pass"
cat stdout | grep "^${red}FAIL${std}: .*fail"
cat stdout | grep "^${blu}SKIP${std}: .*skip"
@@ -103,6 +96,8 @@ test_color ()
test_no_color ()
{
+ # Not a useless use of cat; see above comments "grep-nonprinting"
+ # requirement in 'test-init.sh'.
cat stdout | grep "$esc" && Exit 1
:
}
diff --git a/t/man4.sh b/t/man4.sh
deleted file mode 100755
index c8fd86d..0000000
--- a/t/man4.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2008-2012 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 2, 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/>.
-
-# Ensure 'make dist' fails when help2man replacement man pages are created.
-#
-# The assumption here is the following: if the developer uses help2man to
-# generate man pages from --help output, then these man pages may not be
-# stored in VCS. However, they should be distributed, so that the end user
-# that receives the tarball doesn't have to install help2man. If they are
-# not distributed, then the developer should make help2man a prerequisite
-# to building the package from a tarball, e.g., with a configure check for
-# help2man that errors out if it is unavailable. In both cases it is
-# sufficient to check only distributed man pages.
-#
-# Idea of this whole shenanigan is to allow somebody to check out sources from
-# a VCS and build and install them without needing help2man installed. The
-# installed man pages will be bogus in this case. Typically, this happens
-# when developers ask users to try out a fix from VCS; the developers
themselves
-# will usually have help2man installed (or should install it).
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-dist_man_MANS = $(srcdir)/foo.1 bar.1
-dist_bin_SCRIPTS = foo bar
-$(srcdir)/foo.1:
- $(HELP2MAN) --output=$@ $(srcdir)/foo
-bar.1:
- $(HELP2MAN) --output=$(srcdir)/bar.1 $(srcdir)/bar
-END
-
-cat >>configure.ac <<'END'
-AM_MISSING_PROG([HELP2MAN], [help2man])
-AC_OUTPUT
-END
-
-cat > foo <<'END'
-#! /bin/sh
-while test $# -gt 0; do
- case $1 in
- -h | --help) echo "usage: $0 [OPTIONS]..."; exit 0;;
- -v | --version) echo "$0 1.0"; exit 0;;
- esac
- shift
-done
-END
-cp foo bar
-chmod +x foo bar
-
-mkdir bin
-cat > bin/help2man <<'END'
-#! /bin/sh
-# Fake help2man script that lets 'missing' think it is not installed.
-exit 127
-END
-chmod +x bin/help2man
-PATH=$(pwd)/bin$PATH_SEPARATOR$PATH
-
-grep_error_messages()
-{
- grep ' man pages contain.*missing help2man.* replacement text' stderr \
- && grep 'install help2man' stderr \
- && grep 'regenerate the man pages' stderr \
- || Exit 1
-}
-
-$ACLOCAL
-$AUTOMAKE
-$AUTOCONF
-
-./configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distclean
-
-mkdir build
-cd build
-../configure
-$MAKE
-$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep_error_messages
-
-:
diff --git a/t/man6.sh b/t/man6.sh
index 6c07d7a..dfaeb12 100755
--- a/t/man6.sh
+++ b/t/man6.sh
@@ -61,7 +61,7 @@ cd build
../configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar ../foobar.1
@@ -80,7 +80,7 @@ rm -f *.1 # Remove leftover generated manpages.
./configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar foobar.1
diff --git a/t/missing2.sh b/t/missing-version-mismatch.sh
similarity index 53%
rename from t/missing2.sh
rename to t/missing-version-mismatch.sh
index 89e9a5d..4a2910a 100755
--- a/t/missing2.sh
+++ b/t/missing-version-mismatch.sh
@@ -16,43 +16,35 @@
# Test missing with version mismatches.
+am_create_testdir=empty
. ./defs || Exit 1
-cat >>configure.ac <<'EOF'
-m4_include([v.m4])
-AC_OUTPUT
-EOF
+get_shell_script missing
-: > v.m4
+do_check ()
+{
+ progname=$1; shift;
+ ./missing "$@" 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr >&2
+ $FGREP "WARNING: '$progname' is probably too old." stderr
+}
-: > Makefile.am
+echo 'AC_INIT([x], [1.0]) AC_PREREQ([9999])' >> configure.ac
-get_shell_script missing
+do_check autoconf $AUTOCONF
+do_check autoheader $AUTOHEADER
+do_check aclocal-$APIVERSION $am_original_ACLOCAL
+
+cat > configure.ac << 'END'
+AC_INIT([x], [0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+echo AUTOMAKE_OPTIONS = 9999.9999 > Makefile.am
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# See missing.test for explanations about this.
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' > v.m4
-$MAKE distdir
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fail when timestamps aren't updated and missing is not used.
-$sleep
-touch v.m4
-$MAKE && Exit 1
+: > install-sh
+# FIXME: this doesn't work due to a bug in automake (not 'missing').
+#do_check automake-$APIVERSION $am_original_AUTOMAKE
:
diff --git a/t/missing.sh b/t/missing.sh
deleted file mode 100755
index 473d041..0000000
--- a/t/missing.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003-2012 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 2, 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/>.
-
-# Test missing with version mismatches.
-
-. ./defs || Exit 1
-
-cat >>configure.ac <<'EOF'
-AC_OUTPUT
-EOF
-
-: > Makefile.am
-
-get_shell_script missing
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# Make sure we do use missing, even if the user exported AUTOCONF.
-# (We cannot export this new value, because it would be used by Automake
-# when tracing, and missing is no good for this.)
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' >> aclocal.m4
-$MAKE distdir
-
-# Try version number suffixes if we can add them safely.
-case $MYAUTOCONF in *autoconf)
- ./configure AUTOCONF="${MYAUTOCONF}6789"
- $MAKE
- $sleep
- # Hopefully the install version of Autoconf cannot compete with this one...
- echo 'AC_PREREQ(9999)' >> aclocal.m4
- $MAKE distdir
-esac
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fails when timestamps aren't updated and missing is not used.
-$sleep
-touch aclocal.m4
-$MAKE && Exit 1
-
-:
diff --git a/t/missing3.sh b/t/missing3.sh
index a26f954..e8641da 100755
--- a/t/missing3.sh
+++ b/t/missing3.sh
@@ -23,31 +23,26 @@ get_shell_script missing
# b7cb8259 assumed not to exist.
-./missing b7cb8259 --version 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep . stderr && Exit 1
-./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run b7cb8259 --version && Exit 1
-./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep WARNING stderr
+run_cmd ()
+{
+ st=0; "$@" >stdout 2>stderr || st=$?
+ cat stdout
+ cat stderr >&2
+ return $st
+}
+
+./missing b7cb8259 --version && Exit 1
+grep WARNING stderr && Exit 1
+run_cmd ./missing b7cb8259 --grep && Exit 1
+grep 'WARNING:.*missing on your system' stderr
# missing itself it known to exist :)
-./missing ./missing --version 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep . stderr && Exit 1
-./missing ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run ./missing --version 2>stderr || { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep . stderr && Exit 1
-./missing --run ./missing --grep 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
+run_cmd ./missing ./missing --version || Exit 1
+grep 'missing .*(GNU [aA]utomake)' stdout
+test -s stderr && Exit 1
+run_cmd ./missing ./missing --grep && Exit 1
grep WARNING stderr && Exit 1
-grep Unknown stderr
+grep "missing:.* unknown '--grep'" stderr
+
+:
diff --git a/t/missing5.sh b/t/missing5.sh
deleted file mode 100755
index 363cc1a..0000000
--- a/t/missing5.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2006-2012 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 2, 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/>.
-
-# Test how well 'missing' finds output file names of various tools.
-# PR automake/483.
-
-am_create_testdir=empty
-. ./defs || Exit 1
-
-get_shell_script missing
-
-# These programs may be invoked by 'missing'.
-needed_tools='chmod find sed test touch'
-needed_tools_csep=$(echo $needed_tools | sed 's/ /, /g')
-
-cat >configure.ac <<EOF
-AC_INIT([missing4], [1.0])
-m4_foreach([tool], [$needed_tools_csep],
- [AC_PATH_PROG(tool, tool, [false])
- AC_CONFIG_FILES(tool, chmod +x tool)
- ])
-AC_OUTPUT
-EOF
-
-for tool in $needed_tools; do
- unindent >$tool.in <<EOF
- #! /bin/sh
- exec @$tool@ "\$@"
-EOF
-done
-
-$AUTOCONF
-./configure
-
-echo output-file > output-file
-cp output-file my--output--file-o
-
-save_PATH=$PATH
-PATH=.
-export PATH
-missing --help
-missing --version
-for tool in autom4te help2man makeinfo; do
- missing --run $tool -o my--output--file-o input
- missing --run $tool --output my--output--file-o input
-done
-PATH=$save_PATH
-export PATH
-diff output-file my--output--file-o
-test ! -f ./--file-o
-test ! -f input
diff --git a/t/parallel-tests-no-color-in-log.sh
b/t/parallel-tests-no-color-in-log.sh
index 2f8d3d7..2f19fbc 100755
--- a/t/parallel-tests-no-color-in-log.sh
+++ b/t/parallel-tests-no-color-in-log.sh
@@ -16,19 +16,9 @@
# Colorized output from the testsuite report shouldn't end up in log files.
+required='grep-nonprint'
. ./defs || Exit 1
-esc=''
-
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$esc" | $FGREP "$esc"` in
- "$esc") ;;
-# Creative quoting below to please maintainer-check.
- *) echo "$me: f""grep can't parse nonprinting characters" >&2; Exit 77;;
-esac
-
TERM=ansi; export TERM
cat >>configure.ac <<END
@@ -57,6 +47,8 @@ $AUTOMAKE --add-missing
./configure
mv config.log config-log # Avoid possible false positives below.
$MAKE check AM_COLOR_TESTS=always && Exit 1
-$FGREP "$esc" *.log && Exit 1
+# Not a useless use of cat; see above comments "grep-nonprinting"
+# requirement in 'test-init.sh'.
+cat *.log | grep "$esc" && Exit 1
:
diff --git a/t/parallel-tests-reset-term.sh b/t/parallel-tests-reset-term.sh
index 4cd8086..52e15c0 100755
--- a/t/parallel-tests-reset-term.sh
+++ b/t/parallel-tests-reset-term.sh
@@ -17,20 +17,11 @@
# Check that the testsuite harness correctly handle overrides of the
# TERM variable by either TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
+required='grep-nonprint'
. ./defs || Exit 1
-esc='['
-
TERM=ansi; export TERM
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$esc" | $FGREP "$esc"` in
- "$esc") ;;
- *) skip_ "$FGREP can't parse nonprinting characters" ;;
-esac
-
cat >> configure.ac << 'END'
AC_OUTPUT
END
@@ -67,9 +58,9 @@ $AUTOMAKE -a
./configure
mkcheck TESTS_ENVIRONMENT='TERM=dumb'
-cat stdout | grep "PASS.*foobar" | $FGREP "$esc"
+cat stdout | grep "PASS.*foobar" | grep "$esc\\["
mkcheck AM_TESTS_ENVIRONMENT='TERM=dumb'
-cat stdout | grep "PASS.*foobar" | $FGREP "$esc"
+cat stdout | grep "PASS.*foobar" | grep "$esc\\["
:
diff --git a/t/perf/testsuite-recheck.sh b/t/perf/testsuite-recheck.sh
index 50cc03b..6fd793b 100755
--- a/t/perf/testsuite-recheck.sh
+++ b/t/perf/testsuite-recheck.sh
@@ -69,7 +69,7 @@ END
# Temporarily disable shell traces, to avoid bloating the log file.
set +x
-for i in `seq_ 1 $count`; do
+for i in $(seq_ 1 $count); do
echo dummy $i > $i.log
echo :global-test-result: PASS > $i.trs
echo :test-result: PASS >> $i.trs
diff --git a/t/perf/testsuite-summary.sh b/t/perf/testsuite-summary.sh
index e245b6e..04408ee 100755
--- a/t/perf/testsuite-summary.sh
+++ b/t/perf/testsuite-summary.sh
@@ -38,7 +38,7 @@ END
# Temporarily disable shell traces, to avoid bloating the log file.
set +x
-for i in `seq_ 1 $count`; do
+for i in $(seq_ 1 $count); do
echo false > $i.t
echo dummy $i > $i.log
echo :global-test-result: PASS > $i.trs
diff --git a/t/missing4.sh b/t/remake-aclocal-version-mismatch.sh
similarity index 100%
rename from t/missing4.sh
rename to t/remake-aclocal-version-mismatch.sh
diff --git a/t/remake11.sh b/t/remake11.sh
index 93ef224..3b97df9 100755
--- a/t/remake11.sh
+++ b/t/remake11.sh
@@ -48,10 +48,10 @@ bottom=$(pwd) || fatal_ "getting current working directory"
cd "$ocwd"
-makefiles_am_list=`find . -name Makefile.am | LC_ALL=C sort`
-makefiles_list=`echo "$makefiles_am_list" | sed 's/\.am$//'`
-bar_in_list=`find . -name bar.in | LC_ALL=C sort`
-bar_list=`echo "$bar_in_list" | sed 's/\.in$//'`
+makefiles_am_list=$(find . -name Makefile.am | LC_ALL=C sort)
+makefiles_list=$(echo "$makefiles_am_list" | sed 's/\.am$//')
+bar_in_list=$(find . -name bar.in | LC_ALL=C sort)
+bar_list=$(echo "$bar_in_list" | sed 's/\.in$//')
cat configure.ac # For debugging.
diff --git a/t/remake6.sh b/t/remake6.sh
index b6a3340..b5e9646 100755
--- a/t/remake6.sh
+++ b/t/remake6.sh
@@ -39,7 +39,7 @@ do_check ()
{
$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
- test $(grep -c " --run " stdout) -eq 1
+ test $(grep -c "/missing " stdout) -eq 1
}
# Now, we are set up. Ensure that, for either missing Makefile.in,
diff --git a/t/self-check-me.tap b/t/self-check-me.tap
index 2b720fa..0ac8e20 100755
--- a/t/self-check-me.tap
+++ b/t/self-check-me.tap
@@ -59,8 +59,8 @@ result_ "$r" "override of \$me before ./defs is honored"
unset r
# Overriding $me after sourcing ./defs-static should work.
-s=`$AM_TEST_RUNNER_SHELL -c '. ./defs-static && me=zardoz &&
- . ./defs && echo me=$me' bad.sh`
+s=$($AM_TEST_RUNNER_SHELL -c '. ./defs-static && me=zardoz &&
+ . ./defs && echo me=$me' bad.sh)
command_ok_ "override of \$me after ./defs-static causes no error" \
test $? -eq 0
diff --git a/t/tap-color.sh b/t/tap-color.sh
index 0999504..6773b28 100755
--- a/t/tap-color.sh
+++ b/t/tap-color.sh
@@ -17,9 +17,9 @@
# TAP support:
# - colorization of TAP results and diagnostic messages
+required='grep-nonprint'
. ./defs || Exit 1
-esc=''
# Escape '[' for grep, below.
red="$esc\[0;31m"
grn="$esc\[0;32m"
@@ -28,14 +28,6 @@ blu="$esc\[1;34m"
mgn="$esc\[0;35m"
std="$esc\[m"
-# Check that grep can parse nonprinting characters.
-# BSD 'grep' works from a pipe, but not a seekable file.
-# GNU or BSD 'grep -a' works on files, but is not portable.
-case `echo "$std" | grep .` in
- "$std") ;;
- *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
-esac
-
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = color-tests
AM_TEST_LOG_DRIVER_FLAGS = --comments
@@ -101,7 +93,8 @@ END
test_color ()
{
- # Not a useless use of cat; see above comments about grep.
+ # Not a useless use of cat; see above comments "grep-nonprinting"
+ # requirement in 'test-init.sh'.
cat stdout | grep "^${grn}PASS${std}: all\.test 1 - foo$"
cat stdout | grep "^${lgn}XFAIL${std}: all\.test 2 - bar # TODO td$"
cat stdout | grep "^${blu}SKIP${std}: all\.test 3 - baz # SKIP sk$"
@@ -124,6 +117,8 @@ test_color ()
test_no_color ()
{
+ # Not a useless use of cat; see above comments "grep-nonprinting"
+ # requirement in 'test-init.sh'.
cat stdout | grep "$esc" && Exit 1
:
}
diff --git a/t/tap-global-log.sh b/t/tap-global-log.sh
index 9c19145..3d4663c 100755
--- a/t/tap-global-log.sh
+++ b/t/tap-global-log.sh
@@ -113,8 +113,10 @@ done
grep '^1\.\.0 # SKIP all$' test-suite.log
-case `cat test-suite.log` in
- *"`cat hodgepodge`"*) ;;
+test_suite_contents=$(cat test-suite.log)
+hodgepodge_contents=$(cat hodgepodge)
+case $test_suite_contents in
+ *"$hodgepodge_contents"*) ;;
*) Exit 1;;
esac
diff --git a/t/txinfo30.sh b/t/txinfo30.sh
deleted file mode 100755
index 1766cac..0000000
--- a/t/txinfo30.sh
+++ /dev/null
@@ -1,63 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2005-2012 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 2, 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/>.
-
-# Make sure 'missing texinfo' does not create empty files.
-# Report from Bob Proulx.
-
-. ./defs || Exit 1
-
-echo info_TEXINFOS = bar.texi >Makefile.am
-echo grepme >bar.info
-$sleep
-cat >bar.texi <<EOF
address@hidden bar.info
-EOF
-
-echo AC_OUTPUT >>configure.ac
-
-cat >makeinfo <<\EOF
-#!/bin/sh
-# This script
-# 1. fails so 'missing' can take over
-# 2. does not understand '--version' so 'missing' thinks 'makeinfo' isn't
-# installed
-exec false
-EOF
-
-chmod +x makeinfo
-
-PATH=$(pwd)$PATH_SEPARATOR$PATH
-export PATH
-
-# Otherwise configure might pick up a working makeinfo from the
-# environment. Seen in automake bug#10866.
-unset MAKEINFO || :
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-./configure
-$MAKE
-grep grepme bar.info
-test -f bar.info
-
-# We should not create a missing bar.info.
-rm -f bar.info
-$MAKE && Exit 1
-test ! -f bar.info
-
-:
diff --git a/t/vtexi4.sh b/t/vtexi4.sh
index 4bfd478..f87cb8b 100755
--- a/t/vtexi4.sh
+++ b/t/vtexi4.sh
@@ -21,7 +21,7 @@
# for more vers*.texi files, and does not require makeinfo, tex and
# texi2dvi.
-required='makeinfo tex texi2dvi'
+required='makeinfo tex texi2dvi grep-nonprint'
. ./defs || Exit 1
test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \
@@ -31,9 +31,6 @@ test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date
'+%u') -lt 8 \
|| skip_ "'date' is not POSIX-compliant enough"
day=$(echo "$day" | sed 's/^0//')
-(echo 'x' | grep x) \
- || skip_ "grep doesn't work on input that is not pure text"
-
cat > configure.ac << END
AC_INIT([$me], [123.456])
AM_INIT_AUTOMAKE
@@ -51,7 +48,7 @@ cat > Makefile.am << 'END'
include defs.am
info_TEXINFOS = foo.texi
test-grepinfo:
-## Not useless uses of cat: we only tested that grep worked on
+## Not useless uses of cat: we only tested that grep works on
## non-text input when that's given from a pipe.
cat $(srcdir)/foo.info | grep 'GREPVERSION=$(my_version_rx)='
cat $(srcdir)/foo.info | grep 'GREPEDITION=$(my_version_rx)='
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1-464-g51403a6,
Stefano Lattarini <=