]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sun, 1 Jul 2012 09:48:56 +0000 (11:48 +0200)] 
Merge branch 'master' into ng/master

* master:
  parallel-tests: silence an overly verbose recipe
  tests: fix some uses of 'Exit', where 'exit' should now be used instead
  maintcheck: test scripts should be executable, check for that
  parallel-tests: recipes for "check" and "recheck" are separated again
  tests: prefer "test ! -e FILE" to check that a file doesn't exist
  parallel-tests: "recheck" behaves better in case of compilation failures
  scripts: quote 'like this', not `like this'

+ Extra non-trivial edits:

* lib/am/parallel-tests.am: Add a FIXME comment about automake bug#11791,
stating that we should fix that someday.  This is required because the
changes introduced in mainline automake commit 'v1.12.1-64-g2a3e45d',
which fixed automake bug#11791 there, couldn't be merged correctly in
Automake-NG by the present commit, due to great divergences in the
affected parts of the codebase.
* Makefile.am (XFAIL_TESTS): Add 't/parallel-tests-recheck-pr11791.sh'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 1 Jul 2012 08:14:23 +0000 (10:14 +0200)] 
Merge branch 'maint'

* maint:
  parallel-tests: silence an overly verbose recipe
  tests: fix some uses of 'Exit', where 'exit' should now be used instead
  maintcheck: test scripts should be executable, check for that

13 years agoparallel-tests: silence an overly verbose recipe
Stefano Lattarini [Sat, 30 Jun 2012 21:37:57 +0000 (23:37 +0200)] 
parallel-tests: silence an overly verbose recipe

*  lib/am/check.am (check-TESTS): Here, the part of the recipe
removing the stale '.log' and '.trs' files.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix some uses of 'Exit', where 'exit' should now be used instead
Stefano Lattarini [Sat, 30 Jun 2012 21:34:56 +0000 (23:34 +0200)] 
tests: fix some uses of 'Exit', where 'exit' should now be used instead

* t/parallel-tests-recheck-pr11791.sh: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaintcheck: test scripts should be executable, check for that
Stefano Lattarini [Sat, 30 Jun 2012 21:26:17 +0000 (23:26 +0200)] 
maintcheck: test scripts should be executable, check for that

* syntax-checks.mk (sc_tests_executable): Here, in this new check.
(syntax_check_rules): Add it.
* Makefile.am (dist-hook): Drop, no need to make test cases executable
anymore.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocontrib: drop 'multilib' support
Stefano Lattarini [Sat, 30 Jun 2012 20:41:42 +0000 (22:41 +0200)] 
contrib: drop 'multilib' support

Its tests are hopelessly failing now, it is complex to debug (and I'm
too ignorant about its aims and its implementation to do so), and anyway
it should probably be rewritten to take better advantage of GNU make and
Automake-NG features.  So let's drop it for now, to avoid slowing down
the Automake-NG development.  Anyone interested in the 'multilib' will
send patches re-implementing it after out first Automake-NG beta is out.
Probably several months from now.

* contrib/multilib/README, contrib/multilib/config-ml.in,
* contrib/multilib/multi.m4, contrib/multilib/multilib.am,
* contrib/multilib/symlink-tree, t/help-multilib.sh,
* t/multlib.sh: Remove.
* Makefile.am (EXTRA_DIST): Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 30 Jun 2012 20:17:22 +0000 (22:17 +0200)] 
Merge branch 'maint'

* maint:
  parallel-tests: recipes for "check" and "recheck" are separated again

13 years ago[ng] remake: use '.am/nil' target instead of 'am--refresh'
Stefano Lattarini [Sat, 30 Jun 2012 19:58:28 +0000 (21:58 +0200)] 
[ng] remake: use '.am/nil' target instead of 'am--refresh'

* lib/am/configure.am: Here.  No need to define another do-nothing
target (i.e., 'am--refresh') now that already have a generic one
(i.e., '.am/nil').

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] gitignore: ignore '.am/' directories
Stefano Lattarini [Sat, 30 Jun 2012 19:53:30 +0000 (21:53 +0200)] 
[ng] gitignore: ignore '.am/' directories

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] warns: fix checks against typos in vars (e.g., _LDADD and _SOURCES)
Stefano Lattarini [Wed, 27 Jun 2012 16:05:06 +0000 (18:05 +0200)] 
[ng] warns: fix checks against typos in vars (e.g., _LDADD and _SOURCES)

After commit v1.12.1-302-g67d6102 of 2012-06-05, "[ng] warns: typos in
_SOURCES etc. reported at make runtime", the checks against typos in use
of few special variables (like 'bar_SOURCES' or 'libfoo_a_LIBADD') are
done at make runtime rather than at automake runtime.

Such checks have so far been running unconditionally every time make was
invoked, thus creating a noticeable performance degradation in null or
almost-null builds of packages that, like GNU coreutils, have a lot of
programs and/or use several recursive make invocations.

What is worse, such checks have been unable to interact well with the
Makefile automatic remake rules.  Say that a user encounters a failure
in those checks; he then fixes his 'Makefile.am' accordingly, and re-run
"make", expecting the situation to be sorted out by the automatic remake
rules (as was the case for mainline Automake).  But that doesn't happen,
because those same checks will run again *before* giving the remake rules
a chance to kick in -- thus "make" would fail again, exactly as before,
because the Makefile hasn't been rebuilt, and thus hasn't changed.
So the user would forced to re-run automake and config.status *by hand* to
get back a consistent, correct status in its build system!  Such situation
is utterly unacceptable.

The present change takes care at once of both of the performance and the
correctness problems.

On the performance side, after this change, the time for a null build
on GNU coreutils (bootstrapped with Automake-NG) has gone down from ~8
seconds to ~2 seconds.  Not bad!

* automake.in (generate_makefile): Pass the '%MAKEFILE%' transform
when processing 'check-typos.am'.
* lib/am/check-typos.am: Take advantage of the GNU make automatic restart
capabilities to re-implement the  existing check in a more "lazy" way:
they should be re-run only when Makefile has changes, and only after the
automatic remake rules has rebuilt it (if it needs to be rebuilt).
* lib/am/header-vars.am (.am/nil): New do-nothing target, for now used
only by 'check-typos.am'.
* t/am-dir.sh: Adjust.
* t/maken.sh: Likewise.
* t/output6.sh: Likewise.
* t/spell.sh: Likewise.
* t/spell2.sh: Likewise.
* t/vartypos-whitelist.sh: Likewise.
* t/vartypos.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] perf: disable GNU make builtin rules, for performance reasons
Stefano Lattarini [Wed, 27 Jun 2012 16:05:05 +0000 (18:05 +0200)] 
[ng] perf: disable GNU make builtin rules, for performance reasons

* lib/am/header-vars (MAKEFLAGS): Append '--no-builtin-rules'.  This
enhance performance by removing GNU make builtin rules that would be
rather irrelevant (e.g., rules to automatically check out files from
from RCS or SCCS repositories), or overridden by Automake (e.g., rules
to compile C or C++ files).  With this simple tweak, the null-build
time on GNU coreutils on an aging Debian system goes down from ~ 20
seconds to ~ 9 seconds.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'recheck-fix' into maint
Stefano Lattarini [Sat, 30 Jun 2012 19:59:56 +0000 (21:59 +0200)] 
Merge branch 'recheck-fix' into maint

* recheck-fix:
  parallel-tests: recipes for "check" and "recheck" are separated again

13 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 30 Jun 2012 19:32:20 +0000 (21:32 +0200)] 
Merge branch 'maint'

* maint:
  parallel-tests: "recheck" behaves better in case of compilation failures
  scripts: quote 'like this', not `like this'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoparallel-tests: recipes for "check" and "recheck" are separated again
Stefano Lattarini [Sat, 30 Jun 2012 18:53:39 +0000 (20:53 +0200)] 
parallel-tests: recipes for "check" and "recheck" are separated again

* lib/am/check.am: Here.  They have distinctly diverged recently, and
the reduction in code duplication obtained keeping their recipes united
is not anymore worth the extra complications.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'recheck-fix' into maint
Stefano Lattarini [Sat, 30 Jun 2012 18:20:22 +0000 (20:20 +0200)] 
Merge branch 'recheck-fix' into maint

* recheck-fix:
  parallel-tests: "recheck" behaves better in case of compilation failures
  scripts: quote 'like this', not `like this'

13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sat, 30 Jun 2012 18:18:32 +0000 (20:18 +0200)] 
Merge branch 'master' into ng/master

* master:
  texi: clean after Texinfo manuals in $(SUBDIRS) directories correctly
  coverage: regression in texinfo "make mostlyclean" with $(SUBDIRS)
  tests: fix a spurious failure
  configure: fix detection of POSIX shell to work in a VPATH build
  tests: prefer "test ! -e FILE" to check that a file doesn't exist
  configure: move a misplaced "section" comment
  configure: clump check for ${var%...} and ${var#...} expansion together
  cosmetics: improve wording of a couple of configure messages
  configure: the testsuite shell must support 'test -e' and 'test ! -e'
  tests: remove stale workarounds for Solaris /bin/sh

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: prefer "test ! -e FILE" to check that a file doesn't exist
Stefano Lattarini [Sat, 30 Jun 2012 17:46:13 +0000 (19:46 +0200)] 
tests: prefer "test ! -e FILE" to check that a file doesn't exist

* t/autohdrdry.sh: Here, rather than using "test ! -r FILE".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotexi: clean after Texinfo manuals in $(SUBDIRS) directories correctly
Jim Meyering [Sat, 30 Jun 2012 11:53:37 +0000 (13:53 +0200)] 
texi: clean after Texinfo manuals in $(SUBDIRS) directories correctly

Fixes the regression exposed by previous commit 'v1.12.1-165-g498492f'.

* automake.in (handle_texinfo_helper): Add $infobase.{t2d,t2p}
to @mostly_cleans, but *without* the '$relative_dir/' prefix.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocoverage: regression in texinfo "make mostlyclean" with $(SUBDIRS)
Stefano Lattarini [Sat, 30 Jun 2012 14:37:06 +0000 (16:37 +0200)] 
coverage: regression in texinfo "make mostlyclean" with $(SUBDIRS)

After commit v1.12.1-91-g205c757 of 2012-06-20, "texi: require
Texinfo >= 4.9, related enhancements", the presence of a Texinfo manual
'manual.texi' in a subdir (say 'doc/') of a package using a recursive
make setup would cause "make distcheck" to fail, due to the presence of
the 'manual.t2d/' directory created by texi2dvi.  That directory would
not be correctly removed because the 'mostlyclean' rule would run, from
within the 'doc/' sub-directory, "rm -rf doc/manual.t2d", instead of
the expected (and correct) "rm -rf manual.t2d".

Reported by Jim Meyering:
<http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00203.html>

* t/txinfo21.sh: Enhance to expose the issue.
* t/txinfo-no-clutter.sh: Likewise, and other miscellaneous improvements.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sat, 30 Jun 2012 11:42:10 +0000 (13:42 +0200)] 
Merge branch 'maint'

* maint:
  tests: fix a spurious failure
  configure: fix detection of POSIX shell to work in a VPATH build
  tests: prefer "test ! -e FILE" to check that a file doesn't exist

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix a spurious failure
Stefano Lattarini [Sat, 30 Jun 2012 10:12:43 +0000 (12:12 +0200)] 
tests: fix a spurious failure

* t/parallel-tests-dry-run-2.sh: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoconfigure: fix detection of POSIX shell to work in a VPATH build
Stefano Lattarini [Sat, 30 Jun 2012 09:28:24 +0000 (11:28 +0200)] 
configure: fix detection of POSIX shell to work in a VPATH build

* configure.ac: When checking whether "test -e" works, use 'config.log',
not 'configure', as the witness file, because the latter does not exist
in the current directory during a VPATH build.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: prefer "test ! -e FILE" to check that a file doesn't exist
Stefano Lattarini [Thu, 28 Jun 2012 22:48:11 +0000 (00:48 +0200)] 
tests: prefer "test ! -e FILE" to check that a file doesn't exist

Once, for the sake of (at least) Solaris 10 /bin/sh, we had to use
"test ! -f FILE" or "test ! -r FILE" or "test ! -d FILE" instead,
because the that shell's 'test' built-in didn't grok the '-e' option.

Note however that we still can't use "test ! -e" in the Makefile recipes
used in the test cases; that is because those recipes are run with the
shell detected by 'configure', and Autoconf-generated configure scripts
do no guarantee to find or provide a POSIX-compatible shell.

* Several tests: Adjust.
* t/yacc-clean-cxx: Adjust, and remove a couple of useless commands.
* t/parallel-tests-dry-run-2.sh: Adjust, and add invocation to
"make -n" forgotten in previous versions of the test.
* t/txinfo26.sh: Adjust, and don't bother to skip the test when it's
run in a directory whose absolute path contain whitespace: that setup
is not supported anyway.
* t/maken3.sh: Adjust, and fix a typo that could cause a minor false
negative.
* t/test-trs-recover2.sh: Prefer using 'skip_' with a suitable error
message over a bare 'exit 77'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 28 Jun 2012 21:35:18 +0000 (23:35 +0200)] 
Merge branch 'maint'

* maint:
  configure: move a misplaced "section" comment
  configure: clump check for ${var%...} and ${var#...} expansion together
  cosmetics: improve wording of a couple of configure messages
  configure: the testsuite shell must support 'test -e' and 'test ! -e'
  tests: remove stale workarounds for Solaris /bin/sh

13 years agoconfigure: move a misplaced "section" comment
Stefano Lattarini [Thu, 28 Jun 2012 21:32:21 +0000 (23:32 +0200)] 
configure: move a misplaced "section" comment

* configure.ac (Create output files): This, move it towards the end
of the script.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoconfigure: clump check for ${var%...} and ${var#...} expansion together
Stefano Lattarini [Thu, 28 Jun 2012 21:29:51 +0000 (23:29 +0200)] 
configure: clump check for ${var%...} and ${var#...} expansion together

And together with those for the ${var%%...} and ${var##...} expansions.
After all, it is basically impossible to find a shell that support one
of them but not the others.

Suggestion by Eric Blake.

* configure.ac: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: improve wording of a couple of configure messages
Stefano Lattarini [Thu, 28 Jun 2012 20:53:03 +0000 (22:53 +0200)] 
cosmetics: improve wording of a couple of configure messages

* configure.ac: Fix a couple of messages so that the configure
output changes from this:

    checking whether /bin/sh "set -e" preserves exit traps... yes
    checking whether /bin/sh "set -x" corrupts stderr... no

to this:

    checking whether /bin/sh preserves exit traps with "set -e"... yes
    checking whether /bin/sh corrupts stderr with "set -x"... no

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoconfigure: the testsuite shell must support 'test -e' and 'test ! -e'
Stefano Lattarini [Thu, 28 Jun 2012 20:49:28 +0000 (22:49 +0200)] 
configure: the testsuite shell must support 'test -e' and 'test ! -e'

* configure.ac: Require that the shell that is to be selected to run
the testsuite understands "set -e" and "set ! -e".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: remove stale workarounds for Solaris /bin/sh
Stefano Lattarini [Thu, 28 Jun 2012 19:52:37 +0000 (21:52 +0200)] 
tests: remove stale workarounds for Solaris /bin/sh

Our testsuite cannot be run with that shell anymore (as it is
not POSIX-compliant).

* t/tap-more.sh: Remove outdated workarounds for Solaris /bin/sh.
* t/self-check-exit.tap: Likewise.
* t/ansi2knr-no-more.sh: Likewise.
* t/add-missing.tap: Likewise.
* t/dist-auxfile.sh: Likewise.
* t/test-driver-custom-multitest-recheck2.sh:  Likewise.
* t/ax/test-init.sh: Remove obsolete references to Solaris
/bin/sh.
* t/confh5.sh: Likewise.
* t/uninstall-fail.sh: Likewise.  And update comments about
quirks of Solaris /bin/ksh and /usr/xpg4/bin/sh.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Thu, 28 Jun 2012 16:52:16 +0000 (18:52 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests init: don't bother allowing '$me' to be overridable
  tests init: typofixes in comments
  tests: one test was not executable, make it so
  readme: fix typo in t/README: s/$((...)/$((...))/
  tests: don't skip if $(abs_builddir) or $(abs_srcdir) contain whitespace
  tests: avoid spurious maintainer-check failures
  tests: remove obsolete hacks around maintainer-check false positives

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 28 Jun 2012 16:38:02 +0000 (18:38 +0200)] 
Merge branch 'maint'

* maint:
  tests init: don't bother allowing '$me' to be overridable
  tests init: typofixes in comments

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests init: don't bother allowing '$me' to be overridable
Stefano Lattarini [Thu, 28 Jun 2012 16:21:33 +0000 (18:21 +0200)] 
tests init: don't bother allowing '$me' to be overridable

We once used that feature in our wrapper tests; but now (and probably
even since commit 'v1.11-1308-g375f23d' of 2011-09-08, "testsuite:
revamp generation of autogenerated tests") it is not needed anymore.
By removing it we can simplify our growingly complex testsuite framework
a little.

* t/ax/test-inist.sh ($me): Do not initialize it here (and only if not
already set), instead ...
* defs-static.in ($me): ... initialize it here unconditionally.
Do not check anymore that $me doesn't come from the environment: that
wouldn't cause any problem now.
Now that '$me' is defined early, prefer it over 'argv0' in early error
messages, both here ...
* defs: ... and here.
* Makefile.am (AM_TESTS_ENVIRONMENT): Do not bother "nullifying" $me
anymore.
* t/self-check-env-sanitize.tap: Adjust.
* t/self-check-me.tap: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests init: typofixes in comments
Stefano Lattarini [Thu, 28 Jun 2012 15:50:20 +0000 (17:50 +0200)] 
tests init: typofixes in comments

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: drop another use of 'using_gmake'
Stefano Lattarini [Thu, 28 Jun 2012 15:37:23 +0000 (17:37 +0200)] 
[ng] tests: drop another use of 'using_gmake'

* t/subdir-order.sh: Here.  The new 'using_gmake' instance had been
brought in one of the recent merges from master.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 28 Jun 2012 15:41:27 +0000 (17:41 +0200)] 
Merge branch 'maint'

* maint:
  tests: one test was not executable, make it so
  readme: fix typo in t/README: s/$((...)/$((...))/
  tests: don't skip if $(abs_builddir) or $(abs_srcdir) contain whitespace
  tests: avoid spurious maintainer-check failures
  tests: remove obsolete hacks around maintainer-check false positives

13 years agotests: one test was not executable, make it so
Stefano Lattarini [Thu, 28 Jun 2012 15:40:10 +0000 (17:40 +0200)] 
tests: one test was not executable, make it so

* t/subdir-order.sh: This test.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: more uses of $(...) over `...` for command substitution
Stefano Lattarini [Thu, 28 Jun 2012 15:31:52 +0000 (17:31 +0200)] 
[ng] tests: more uses of $(...) over `...` for command substitution

Caught by the 'sc_tests_command_subst' maintainer check.

* Several tests: Adjust.   Also ...
* t/memoize.tap: ... use $((...)) instead of `expr ...` here,
and ...
* t/parallel-tests-dynamic.sh: ... add a missing quote here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoreadme: fix typo in t/README: s/$((...)/$((...))/
Stefano Lattarini [Thu, 28 Jun 2012 15:32:15 +0000 (17:32 +0200)] 
readme: fix typo in t/README: s/$((...)/$((...))/

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: don't skip if $(abs_builddir) or $(abs_srcdir) contain whitespace
Stefano Lattarini [Thu, 28 Jun 2012 15:08:34 +0000 (17:08 +0200)] 
tests: don't skip if $(abs_builddir) or $(abs_srcdir) contain whitespace

We used to explicitly skip libtool and gettext tests if the absolute
path of the builddir or of the srcdir which Automake was configured
with contained any whitespace (or other metacharacters).

But several other tests would spuriously fail in such an unholy setup.
To be precise, it would cause 61 'FAIL's and 42 'ERROR's in the whole
Automake testsuite.

The fact that, as of today, nobody has reported any failure of this kind
means that (thankfully) nobody is building automake with $(abs_srcdir)
or $(abs_builddir) mangled by whitespace.  So, instead of trying to cater
to such a broken setup consistently, we just drop the extra check in the
libtool/gettext tests.

In case someone will ever reports a failure due to extra whitespace in
either $(abs_srcdir) or or $(abs_builddir), we will simply enhance our
'configure.ac' to bail out flatly and loudly at such a setup.

* t/ax/test-init.sh: Simplify accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid spurious maintainer-check failures
Stefano Lattarini [Thu, 28 Jun 2012 14:43:43 +0000 (16:43 +0200)] 
tests: avoid spurious maintainer-check failures

* t/ax/test-init.sh: Here, by adding extra quoting for two
occurrences of the string "perl".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: remove a botched comments
Stefano Lattarini [Thu, 28 Jun 2012 14:36:10 +0000 (16:36 +0200)] 
tests: remove a botched comments

* t/suffix-custom.sh: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Thu, 28 Jun 2012 13:57:28 +0000 (15:57 +0200)] 
Merge branch 'master' into ng/master

* master:
  cosmetics: remove trailing whitespace in some files
  coverage: enhance tests in 'missing' script a little
  coverage: tests AM_MISSING_PROG usage
  docs: document AM_MISSING_PROG
  tests: fix a spurious failure with Solaris make
  tests: simpler workaround for shells losing the exit status in exit trap
  tests: avoid several spurious failures on Solaris
  tests: avoid a spurious failure on NetBSD

+ Extra non-trivial edits:
* Several tests: Adjusted to use 'exit' rather than 'Exit'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: remove obsolete hacks around maintainer-check false positives
Stefano Lattarini [Thu, 28 Jun 2012 12:35:12 +0000 (14:35 +0200)] 
tests: remove obsolete hacks around maintainer-check false positives

* gen-testsuite-part, t/test-trs-recover.sh: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 28 Jun 2012 11:27:49 +0000 (13:27 +0200)] 
Merge branch 'maint'

* maint:
  tests: simpler workaround for shells losing the exit status in exit trap

+ Extra non-trivial edits:
* Several tests: Adjusted to use 'exit' rather than 'Exit'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'simplify-exit-trap-workaround' into maint
Stefano Lattarini [Thu, 28 Jun 2012 11:05:29 +0000 (13:05 +0200)] 
Merge branch 'simplify-exit-trap-workaround' into maint

* simplify-exit-trap-workaround:
  tests: simpler workaround for shells losing the exit status in exit trap

+ Extra non-trivial edits:

* t/am-missing-prog.sh: Use 'exit, not 'Exit'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: remove trailing whitespace in some files
Stefano Lattarini [Thu, 28 Jun 2012 09:20:43 +0000 (11:20 +0200)] 
cosmetics: remove trailing whitespace in some files

* lib/missing, t/comment7.sh, t/objc-flags.sh, t/objcxx-flags.sh,
t/perf/testsuite-summary.sh, t/self-check-explicit-skips.sh: Here.

Prompted by a report from Karl Berry.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocoverage: enhance tests in 'missing' script a little
Stefano Lattarini [Thu, 28 Jun 2012 09:09:05 +0000 (11:09 +0200)] 
coverage: enhance tests in 'missing' script a little

* t/am-missing-prog.sh: Here, by also verifying its expected
exit status.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Thu, 28 Jun 2012 08:59:45 +0000 (10:59 +0200)] 
Merge branch 'maint'

* maint:
  coverage: tests AM_MISSING_PROG usage
  docs: document AM_MISSING_PROG

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocoverage: tests AM_MISSING_PROG usage
Stefano Lattarini [Thu, 28 Jun 2012 08:55:13 +0000 (10:55 +0200)] 
coverage: tests AM_MISSING_PROG usage

Now that AM_MISSING_PROG is documented, we want to make sure it
works as expected when used in third-party code.

* t/am-missing-prog.sh: New test.
* t/ammissing: Rename ...
* t/am-macro-not-found.sh: ... like this, to avoid confusion (this
test has nothing to do with the 'missing' script nor with the
'AM_MISSING_PROG' macro).
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agodocs: document AM_MISSING_PROG
Eric Blake [Wed, 27 Jun 2012 21:55:14 +0000 (15:55 -0600)] 
docs: document AM_MISSING_PROG

Addresses automake bug#11793.

This macro has been present for a long time, and coreutils has been
relying on it despite no documentation, which argues that it is stable
enough to be worth documenting.

Furthermore, since we are hoping to change our preferred invocation
from 'missing --run program' to 'missing program' in a future version
of automake, we need a way for packages to consistently get the
preferred invocation form rather than open-coding a call to 'missing'.
In particular, the Autoconf manual would love to recommend this macro
when discussing how to integrate an autotest suite with automake.

* doc/automake.texi (Public Macros): Document AM_MISSING_PROG.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Wed, 27 Jun 2012 13:29:42 +0000 (15:29 +0200)] 
Merge branch 'maint'

* maint:
  tests: fix a spurious failure with Solaris make
  tests: avoid several spurious failures on Solaris
  tests: avoid a spurious failure on NetBSD

13 years agotests: fix a spurious failure with Solaris make
Stefano Lattarini [Wed, 27 Jun 2012 13:07:03 +0000 (15:07 +0200)] 
tests: fix a spurious failure with Solaris make

* t/subdir-order.sh: Run make in parallel only if the make implementation
truly supports it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/cleanup-revamp' into ng/master
Stefano Lattarini [Wed, 27 Jun 2012 11:19:53 +0000 (13:19 +0200)] 
Merge branch 'ng/cleanup-revamp' into ng/master

* ng/cleanup-revamp:
  [ng] cleanup: merge '%compile_clean_files' in '%clean_files'
  [ng] clean: drop minor DOS-related cruft in libtool support
  [ng] cleanup: remove 'clean-hdr.am'
  [ng] check: keep cleaning of '.log' and '.trs' files near other rules
  [ng] cleanup: remove 'libtool.am'
  [ng] refactor: prefer '&file_contents' over '&file_contents_internals'
  [ng] cleanup: merge '%compile_clean_files' in '%clean_files'
  [ng] refactoring: no "cleaning" rules in compile.am
  [ng] clean: don't remove object files in '.' unconditionally
  [ng] cleanup: remove 'depend.am'
  [ng] refactoring: move definition of $(am__mv) in depend2.am
  [ng] automake: new global variable '%clean_dirs'
  [ng] clean: do not ignore errors while removing files
  [ng] clean: revamp recipes and APIs to extend cleaning rules
  [ng] clean: simplify cleaning of compiled objects
  [ng] deptrack: clean depdirs using *clean-am targets
  [ng] deptrack: remove an obsolete comment

13 years agoparallel-tests: "recheck" behaves better in case of compilation failures
Stefano Lattarini [Wed, 27 Jun 2012 10:47:17 +0000 (12:47 +0200)] 
parallel-tests: "recheck" behaves better in case of compilation failures

With this change, the "recheck" target behaves better in the face of build
failures related to previously failed tests.  For example, if a test is a
compiled program that must be rerun by "make recheck", and its compilation
fails, that test will still be rerun by further "make recheck" invocations.
Previously, its '.log' and '.trs' would have both been lost, so that the
test would have not been re-run.

This change fixes automake bug#11791.

* NEWS: Update.
* lib/am/check.am (recheck, check-TESTS): Adjust to cater to scenario
described above.
* t/parallel-tests-recheck-pr11791.sh: New test.
* t/list-of-tests.mk: Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] missing: no need to suggest GNU make explicitly
Stefano Lattarini [Wed, 27 Jun 2012 11:05:00 +0000 (13:05 +0200)] 
[ng] missing: no need to suggest GNU make explicitly

* lib/missing (give_advice): Here.  In mainstream Automake, possible use
of GNU make was suggested as a remedy against useless remake of '.info'
files triggered by some buggy vendor make implementations.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] missing: suggest Automake-NG, not mainstream Automake
Stefano Lattarini [Wed, 27 Jun 2012 10:59:18 +0000 (12:59 +0200)] 
[ng] missing: suggest Automake-NG, not mainstream Automake

* lib/missing (program_details): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Wed, 27 Jun 2012 10:55:59 +0000 (12:55 +0200)] 
Merge branch 'master' into ng/master

* master:
  missing: --run is supported again (as a no-op) for use by older automake

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoscripts: quote 'like this', not `like this'
Stefano Lattarini [Wed, 27 Jun 2012 09:13:54 +0000 (11:13 +0200)] 
scripts: quote 'like this', not `like this'

* lib/test-driver.sh: Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'missing-not-touch-just-warn'
Stefano Lattarini [Tue, 26 Jun 2012 18:16:21 +0000 (20:16 +0200)] 
Merge branch 'missing-not-touch-just-warn'

* missing-not-touch-just-warn:
  missing: --run is supported again (as a no-op) for use by older automake

13 years agomissing: --run is supported again (as a no-op) for use by older automake
Eric Blake [Tue, 26 Jun 2012 16:40:39 +0000 (10:40 -0600)] 
missing: --run is supported again (as a no-op) for use by older automake

Commit v1.12.1-87-ga22717d of 2012-06-21 ("missing: do not touch
timestamps; only warn for out-of-date files") has removed the '--run'
option, since our new preferred calling conventions now imply it; but
if a newer 'missing' is mixed with an already built project that used
an older Automake version (this happened in practice for GNU m4; see:
<http://lists.gnu.org/archive/html/bug-m4/2012-06/msg00001.html>), then
the 'Makefile' in that project will fail due to passing the '--run'
option when trying to bring the project up-to-date.

* lib/missing: Parse and ignore '--run'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Mon, 25 Jun 2012 08:49:49 +0000 (10:49 +0200)] 
Merge branch 'master' into ng/master

* master:
  missing: don't cater to 'configure.in' in our advice
  missing: better tips about missing tools

+ Extra non-trivial edits:

* lib/missing (autoheader*): Remove reference to 'acconfig.h',
support for which has been removed in Automake-NG (see commit
v1.12-263-gf94562c).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'missing-not-touch-just-warn'
Stefano Lattarini [Mon, 25 Jun 2012 08:40:39 +0000 (10:40 +0200)] 
Merge branch 'missing-not-touch-just-warn'

* missing-not-touch-just-warn:
  missing: don't cater to 'configure.in' in our advice
  missing: better tips about missing tools

13 years agomissing: don't cater to 'configure.in' in our advice
Stefano Lattarini [Mon, 25 Jun 2012 08:38:58 +0000 (10:38 +0200)] 
missing: don't cater to 'configure.in' in our advice

The use of 'configure.in' as autoconf input now deprecated the development
versions of both Automake and Autoconf, and we'd like to speed up its
demise.

* missing: In the advice displayed in case some autotools are detected to
be missing, refer to 'configure.ac' unconditionally, instead of referring
to 'configure.in' when that file exists in the current directory (and no
'configure.ac' does).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: simpler workaround for shells losing the exit status in exit trap
Stefano Lattarini [Sun, 24 Jun 2012 08:36:15 +0000 (10:36 +0200)] 
tests: simpler workaround for shells losing the exit status in exit trap

Now that we can assume our tests are run by a decent POSIX shell, we
can simplify our workaround aimed at having the exit status propagated
correctly to the code in the exit trap.  Unfortunately, we cannot
dispense with such a workaround altogether, because it's still required
by some shells we need to support (at least Solaris 10 /bin/ksh and
/usr/xpg4/bin/sh).

For more information about the need of that workaround, see the entry
about 'trap' in the section "Limitations of Shell Builtins" in the
Autoconf manual:
<http://www.gnu.org/software/autoconf/manual/autoconf.html#trap>

The new workaround has been tested successfully with the following
shells:

  - Bash 4.1
  - Bash 3.2
  - Bash 3.0
  - Bash 2.05b
  - dash 0.5.5.1
  - dash 0.5.2
  - AT&T Ksh 93u (from official Debian package)
  - MirBSD Korn Shell 40.2 (from official Debian package)
  - Solaris 9, 10 and 11 /bin/ksh
  - Solaris 9, 10 and 11 /usr/xpg4/bin/sh
  - NetBSD 5.1 /bin/sh
  - NetBSD 5.1 /bin/ksh

* t/ax/test-init.sh (Exit): Rename ...
(_am_exit): ... like this.
(exit): New alias for '_am_exit'.  We cannot simply redefine 'exit'
as a shell function, because some shells (dash 0.5.5.1, Solaris 10
/bin/ksh and /usr/xpg4/bin/sh) do not allow it.
(_am_exit, trap): Add extra escaping for 'exit' calls, to ensure we
really invoke the 'exit' builtin and not our alias with the same
name.
* configure.ac: Check that the shell selected to run our testsuite
supports aliases named like shell builtins.
* t/REAMDE: Adjust.
* All tests: Adjust, by simply using 'exit' instead of 'Exit'.
* t/self-check-explicit-skips.sh: Adjust: the first usage of 'exit'
after it has been redefined as an alias must be on a new line w.r.t.
that where the alias is defined, in order for the redefinition to be
honored.
* syntax-checks.mk (sc_tests_Exit_not_exit): Delete.
(sc_tests_exit_not_Exit): New.
(syntax_check_rules): Adjust.
(sc_tests_automake_fails): Simplify the recipe a little.
* Several tests: Remove now useless spurious quoting once required
to placate the 'sc_tests_Exit_not_exit' maintainer check.
* gen-testsuite-part: Likewise.  Also, avoid uses of 'Exit' in the
generated scripts.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid several spurious failures on Solaris
Stefano Lattarini [Sun, 24 Jun 2012 15:57:10 +0000 (17:57 +0200)] 
tests: avoid several spurious failures on Solaris

* t/ax/is_newest: Rewrite to be Bourne-compatible, for /bin/sh shells like
Solaris' that are not POSIX-conforming.  The script is so small that such
a rewrite is easier than going through the hoops that would be required to
ensure this script is always executed with a POSIX shell.
* t/ax/is: Add a comment stating that this script is to be kept Bourne
compatible as well.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid a spurious failure on NetBSD
Stefano Lattarini [Sun, 24 Jun 2012 14:52:51 +0000 (16:52 +0200)] 
tests: avoid a spurious failure on NetBSD

* t/maken.sh: Do not expect the timestamp of the current directory
to be unchanged after a "make -n".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Sun, 24 Jun 2012 08:56:46 +0000 (10:56 +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 <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Sun, 24 Jun 2012 08:12:43 +0000 (10:12 +0200)] 
Merge branch 'maint'

* maint:
  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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix automatic re-execution of tests with Zsh
Stefano Lattarini [Sat, 23 Jun 2012 11:42:10 +0000 (13:42 +0200)] 
tests: fix automatic re-execution of tests with Zsh

* defs: Use '$argv0' instead of '$0'.  With Zsh not started right
away in Bourne-compatibility mode, the latter will be the path not
of the test script itself, but of the file it's currently sourcing
-- i.e., in our case, './defs'.  This would cause the automatic
re-execution code to execute './defs' (basically a no-op) rather
than re-run the test correctly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: drop support for older Zsh shells
Stefano Lattarini [Sat, 23 Jun 2012 09:16:08 +0000 (11:16 +0200)] 
tests: drop support for older Zsh shells

* defs-static.in: Here.  The fact that such support has been broken for
almost a year (only fixed by today's commit 'v1.12.1-57-gf1e0300'),
causing no bug reports from anyone, shows that such support is not truly
warranted.  And it will get in the way of future improvements in the
handling of the exit trap (because bugs in older Zsh versions will
prevent some of our planned improvements).  So just drop it.
* t/README: Remove obsolete advice for working around bugs in older
versions of Zsh; instead, indicate version 4.3 is the oldest Zsh now
supported.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: allow AM_TEST_RUNNER_SHELL to be overridden
Stefano Lattarini [Sat, 23 Jun 2012 08:39:33 +0000 (10:39 +0200)] 
tests: allow AM_TEST_RUNNER_SHELL to be overridden

* defs-static.in: Here.  This will make it easier for the maintainer
to run some self checks (like those in 't/self-check-exit.tap') with
different shells, to look for possible portability problems.  Fix a
typo (doubled "the") while we are at it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix setup for older Zsh
Stefano Lattarini [Sat, 23 Jun 2012 08:34:29 +0000 (10:34 +0200)] 
tests: fix setup for older Zsh

* defs-static.in: After the addition of TAP-based tests and our renaming
of "simple" test scripts from 'tests/foo.test' to 't/foo.sh', a test name
is valid if it matches the wildcard "*.sh" or "*.tap", not the wildcard
"*.test".  Adjust accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomissing: better tips about missing tools
Stefano Lattarini [Sat, 23 Jun 2012 07:04:46 +0000 (09:04 +0200)] 
missing: better tips about missing tools

* lib/missing: Try to point the user to the home page of such tools
where possible.  Also, make clear that some tools (e.g., aclocal or
autoheader) are distributed as part of bigger projects (resp. automake
and autoconf, in those cases).  While at it, refactor and re-format
the existing code heavily, in particular introducing
(give_advice): ... this new function in the process.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Fri, 22 Jun 2012 22:42:06 +0000 (00:42 +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 <stefano.lattarini@gmail.com>
13 years agoMerge branch 'missing-not-touch-just-warn'
Stefano Lattarini [Fri, 22 Jun 2012 22:32:30 +0000 (00:32 +0200)] 
Merge branch 'missing-not-touch-just-warn'

* missing-not-touch-just-warn:
  missing: do not touch timestamps; only warn for out-of-date files

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 22 Jun 2012 22:16:26 +0000 (00:16 +0200)] 
Merge branch 'maint'

* maint:
  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 <stefano.lattarini@gmail.com>
13 years agotests: avoid one last `...` command substitution in 'test-init.sh'
Stefano Lattarini [Fri, 22 Jun 2012 22:12:08 +0000 (00:12 +0200)] 
tests: avoid one last `...` command substitution in 'test-init.sh'

* t/ax/test-init.sh (me): In the definition of this variable.  This
also shave off a couple of forks, and the need for a sanity check
only required in fringe situations.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaintcheck: guard against `...` for command substitution in test cases
Stefano Lattarini [Fri, 22 Jun 2012 22:06:10 +0000 (00:06 +0200)] 
maintcheck: guard against `...` for command substitution in test cases

But still allow them in configure.ac, Makefile.am and shell scripts
created or used inside test cases itself, because Autoconf (as of
version 2.69) does not yet ensure that $CONFIG_SHELL will be set to
a proper POSIX shell.

* syntax-checks.mk (sc_tests_command_subst): New check.
(syntax-check_rules): Add it.
* t/tap-global-log.sh: Minimal tweakings to avoid triggering the
new maintainer check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: more uses of $(...) over `...` for command substitution
Stefano Lattarini [Fri, 22 Jun 2012 21:31:00 +0000 (23:31 +0200)] 
tests: more uses of $(...) over `...` for command substitution

Somehow missed by the previous changes.  No big deal, fix them now.

* t/ax/depcomp.sh: Here.
* t/autodist.sh: And here.
* t/autodist-no-duplicate.sh: And here.
* t/autodist-subdir.sh: Ad here.
* t/remake11.sh t/self-check-me.tap: And here.
* t/perf/testsuite-summary.sh: And here.
* t/perf/testsuite-recheck.sh: And here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: quote `like this', not 'like this', in a couple of tests
Stefano Lattarini [Fri, 22 Jun 2012 21:18:54 +0000 (23:18 +0200)] 
cosmetics: quote `like this', not 'like this', in a couple of tests

* t/ansi2knr-no-more.sh: Here.
* t/aclocal-verbose-install.sh: And here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoreadme: clarify/extend few entries in 't/README'
Stefano Lattarini [Fri, 22 Jun 2012 21:14:38 +0000 (23:14 +0200)] 
readme: clarify/extend few entries in 't/README'

* t/README (Writing test cases): Here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoreadme: better separation of entries in 't/README'
Stefano Lattarini [Fri, 22 Jun 2012 21:06:55 +0000 (23:06 +0200)] 
readme: better separation of entries in 't/README'

* t/README (Writing test cases): Prepend different entries with a '*'
character acting like a bullet in a list.  This make different entries
better separated, visually-wise.  Minor related reformatting.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoreadme: subsections "Do" and "Do not" in 't/README' merged
Stefano Lattarini [Fri, 22 Jun 2012 21:01:37 +0000 (23:01 +0200)] 
readme: subsections "Do" and "Do not" in 't/README' merged

* t/README (Writing test cases): Merge subsections "Do" and "Do not".
The distinction was rather artificial, and more confusing than helpful.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: new requirement 'grep-nonprint'
Stefano Lattarini [Fri, 22 Jun 2012 20:31:35 +0000 (22:31 +0200)] 
tests: new requirement 'grep-nonprint'

* t/ax/test-inist.sh ($esc): New, a literal escape character.
(grep-nonprint): New requirement, check that the grep implementation
available that can handle non-printing characters correctly.
* t/color.sh: Use it instead of hand-rolled equivalent, and do not
(re)define '$esc' explicitly.
* t/color2.sh: Likewise.
* t/tap-color.sh: Likewise.
* t/vtexi4.sh: Likewise.
* t/parallel-tests-no-color-in-log.sh: Likewise.  Also prefer the use
of grep over that of $FGREP, because the new requirement only check
grep, and ensure we only grep non-printing characters from a pipe, to
avoid hitting a BSD grep limitation.
* t/parallel-tests-reset-term.sh: Likewise.
* t/ax/tap-summary-aux.sh: Use '$esc' instead of hard-coding the
literal escape character.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agocosmetics: fix description of an expected error message in a test
Stefano Lattarini [Fri, 22 Jun 2012 19:59:26 +0000 (21:59 +0200)] 
cosmetics: fix description of an expected error message in a test

* t/vartypo2.sh: Here.  This reflects the change from `this style'
of quoting to 'this style'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: assume automake quotes 'like this', not `like this'
Stefano Lattarini [Fri, 22 Jun 2012 19:44:15 +0000 (21:44 +0200)] 
tests: assume automake quotes 'like this', not `like this'

* t/add-missing.tap: Here.  This slightly simplifies and/or enhances
some grepping checks on automake diagnostic.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Fri, 22 Jun 2012 18:05:11 +0000 (20:05 +0200)] 
Merge branch 'master' into ng/master

* master:
  tests: prefer using 'is_newest' over 'ls -t' hacks
  tests: implement is_newest as an auxiliary script, not shell function
  tests: fix some spurious failures in VPATH setup
  tests: work in VPATH setup again
  tests: automatic re-execution works for non-POSIX shells too
  tests: use more POSIX shell features our test scripts
  docs: avoid failures with development version of Texinfo (4.13.90)
  typofix: s/test derivers/test drivers/ in check.am comments
  typofix: s/env/even/ in comments in GNUmakefile

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 22 Jun 2012 16:55:01 +0000 (18:55 +0200)] 
Merge branch 'maint'

* maint:
  tests: prefer using 'is_newest' over 'ls -t' hacks
  tests: implement is_newest as an auxiliary script, not shell function
  tests: fix some spurious failures in VPATH setup
  tests: work in VPATH setup again

13 years agotests: prefer using 'is_newest' over 'ls -t' hacks
Stefano Lattarini [Fri, 22 Jun 2012 16:15:21 +0000 (18:15 +0200)] 
tests: prefer using 'is_newest' over 'ls -t' hacks

To verify that a file 'new' is newer than the file 'old', it's much
cleaner to use "is_newest new old" rather than the more clumsy
"ls -t". Adjust several of our tests accordingly.

* syntax-checks.mk (sc_tests_ls_t): New check, guard against uses
of "ls -t" and similar.
(syntax_check_rules): Add it.
* t/maken.sh: Adjust.
* t/autohdr4.sh: Likewise.
* t/extradep2.sh: Likewise.
* t/lex-depend-cxx.sh: Likewise.
* t/extradep.sh: Likewise.
* t/yacc-depend2.sh: Likewise.
* t/yacc-pr204.sh: Likewise.
* t/lex-pr204.sh: Likewise.
* t/yacc8.sh: Likewise.
* t/acloca13.sh: Likewise.
* t/lex-depend.sh: Likewise, and enhance.
* t/acloca14.sh: Likewise.
* t/aclocal7.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: implement is_newest as an auxiliary script, not shell function
Stefano Lattarini [Fri, 22 Jun 2012 14:18:28 +0000 (16:18 +0200)] 
tests: implement is_newest as an auxiliary script, not shell function

This will allow to also use it in the makefile recipes used in our
test cases.

* t/ax/test-init.sh (is_newest): Remove.
* t/ax/is_newest: New script.
* Makefile.am (EXTRA_DIST): Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix some spurious failures in VPATH setup
Stefano Lattarini [Fri, 22 Jun 2012 13:34:12 +0000 (15:34 +0200)] 
tests: fix some spurious failures in VPATH setup

* t/self-check-cleanup.tap: No need to copy the 'ax/t/test-init.sh'
file over in our temporary directory.
* t/self-check-reexec.tap: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: work in VPATH setup again
Stefano Lattarini [Fri, 22 Jun 2012 13:14:20 +0000 (15:14 +0200)] 
tests: work in VPATH setup again

* defs: Drop overly paranoid sanity checks that was causing all the tests
to fail spuriously when run in a VPATH setup, with a message like:
"../t/nodef.sh: ./t/ax/test-init.sh: not found in current directory".
Those checks looked for invariants that, even if broken, would still
cause the test to fail very early and with a pretty clear error message
anyway.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 22 Jun 2012 12:52:21 +0000 (14:52 +0200)] 
Merge branch 'maint'

* maint:
  tests: automatic re-execution works for non-POSIX shells too
  tests: use more POSIX shell features our test scripts

+ Extra non-trivial edits:

* t/ax/test-init.sh: Apply the diffs between past versions of
'defs' in maint and in master; i.e., remove handling of $required
entries 'texi2dvi-o' and 'makeinfo-html', and adjust to the fact
that the parallel testsuite harness is now the default.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: automatic re-execution works for non-POSIX shells too
Stefano Lattarini [Fri, 22 Jun 2012 09:40:39 +0000 (11:40 +0200)] 
tests: automatic re-execution works for non-POSIX shells too

Some inferior shells are too greedy in parsing their input.  If a
non-POSIX Bourne shell (like Solaris 10 /bin/sh) was used to launch
one of our test scripts, it would fail unconditionally, because it
unexpectedly saw some (by it) unsupported constructs, notwithstanding
such constructs being placed *after* the code implementing automatic
test re-execution with a better shell.  In conclusion, the shell
bailed out like this:

    $ /bin/sh t/ar.sh
    $ t/ar.sh: syntax error at line 257: `is_newest_files=$' unexpected

By moving all the potentially problematic code in a separate file, to
be sourced only after the code for automatic re-execution with a better
shell, we ensure that inferior shell cannot see such code by mistake.

* defs: All code after automatic shell re-execution moved out ...
* t/ax/test-init.sh: ... to this new file.
* syntax-checks.mk (xdefs): Add it.
* Makefile.am (dist_check_DATA): Add it.  Also move in 'defs' from
a less explicit 'check_DATA' declaration.
(nodist_check_DATA):  Move in 'defs-static' from a less explicit
'check_DATA' declaration.
(check_DATA): Remove.
* t/self-check-sanity.sh: Remove, it was actually too hacky and brittle,
sanity-checking situations we don0t actually care about.
* t/list-of-tests.mk: Adjust.
* t/self-check-explicit-skips.sh: Adjust, and fix a botched heading
comments while we are at it.
* t/self-check-reexec.tap: Adjust.
* t/self-check-cleanup.tap: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: use more POSIX shell features our test scripts
Stefano Lattarini [Thu, 14 Jun 2012 11:13:58 +0000 (13:13 +0200)] 
tests: use more POSIX shell features our test scripts

Since commit 'v1.12-36-g2d68fd9' of 2012-05-07, "configure: search a
sturdy POSIX shell to be used in the testsuite", the shell running
our test script is assured to be a POSIX-conforming shell, so we can
use the more modern and flexible idioms and features that we couldn't
use when we also aimed at compatibility with non-POSIX Bourne shells,
like Solaris /bin/sh.

* t/README: Suggest to use POSIX shell features liberally in test cases,
with possible exception of Makefile recipes and configure shell code.
* Several tests: Adjust to use more POSIX shell features; e.g., $(...)
rather than `...`, $((...)) rather than `expr ...`, "if ! CMD; then ..."
instead of "if CMD; then :; else ...", and so on.
In several places, when using the 'test' built-in, prefer '-eq' over
'=' for numeric comparisons, and prefer "grep -c PATTERN FILE" over
"grep PATTERN FILE | wc -l".
Throw in other low-hanging easy improvements and fixlets while we are
at it.
* t/ax/depcomp.sh, t/ax/tap-summary-aux.sh, t/ax/tap-functions.sh,
defs, defs-static.in: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: merge '%compile_clean_files' in '%clean_files'
Stefano Lattarini [Thu, 21 Jun 2012 20:07:15 +0000 (22:07 +0200)] 
[ng] cleanup: merge '%compile_clean_files' in '%clean_files'

No need to keep them separated anymore.

* automake.in (%libtool_clean_directories): Delete.
(initialize_per_input): Don't reset it.
(handle_compile): Don't merge '%libtool_clean_directories' (after
proper editing) into '%clean_dirs'.
(handle_ltlibraries, handle_programs, handle_single_transform):
Update '%clean_dirs', rather than '%libtool_clean_directories'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] clean: drop minor DOS-related cruft in libtool support
Stefano Lattarini [Thu, 21 Jun 2012 19:49:50 +0000 (21:49 +0200)] 
[ng] clean: drop minor DOS-related cruft in libtool support

* automake.in (handle_libtool): Do not bother cleaning '_libs'
directories, they are only used by Libtool on MS-DOS (and we
don't support that anymore).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'clean-hdr.am'
Stefano Lattarini [Thu, 21 Jun 2012 19:26:17 +0000 (21:26 +0200)] 
[ng] cleanup: remove 'clean-hdr.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/clean-hdr.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_configure): Just add the header configs and their
stamp files to '%clean_files', instead of processing the now-removed
'clean-hdr.am' to obtain the same effect.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: keep cleaning of '.log' and '.trs' files near other rules
Stefano Lattarini [Thu, 21 Jun 2012 10:27:06 +0000 (12:27 +0200)] 
[ng] check: keep cleaning of '.log' and '.trs' files near other rules

* lib/am/parallel-tests.am: Add $(am__test_results), $(am__test_logs)
and $(TEST_SUITE_LOGS) to the list of files removed by "make mostlyclean"
here ...
* automake.in (handle_tests): ... rather than here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cleanup: remove 'libtool.am'
Stefano Lattarini [Thu, 21 Jun 2012 08:38:01 +0000 (10:38 +0200)] 
[ng] cleanup: remove 'libtool.am'

It's so small and dumb that it's easier and cleaner to just inline
it in the automake script.

* lib/am/libtool.am: Delete.
* Makefile.am (dist_am_DATA): Remove it.
* automake.in (handle_libtool): Just add the list of all the '.libs'
directories to '%libtool_clean_directories', instead of processing the
now-removed 'libtool.am' to obtain the same effect.  Similarly, when
processing the Makefile in the top-level directory, add 'libtool' and
'config.lt' to '%clean_files'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>