Stefano Lattarini [Fri, 3 Feb 2012 14:05:48 +0000 (15:05 +0100)]
tests: improve and rework tests on dependency tracking
Fixes automake bug#10434. Suggestion by Peter Rosin.
The 'depcomp.tap' test case worked by trying to unconditionally
force the compiler in use by the testsuite to use, one by one, *all*
the dependency modes known by the 'depcomp' script, and, for each
such forced mode that was compatible enough with said compiler not
to cause breakage in the basic compilation rules, checking that it
was *also* good enough not to break remake rules in VPATH builds.
This seemed a good approach when this test was first introduced, as
it apparently increased coverage for the less used and less tested
dependency-tracking modes. But in the log run it turned out the
approach was actually in part too brittle, causing some annoying
spurious failures (as with the Tru64 depmode forced on GCC, see
automake bug#10434), and partly too forgiving, since, for some of
the more corner-case dependency modes, the 'depcomp' script simply
reverts to silently disabling dependency tracking when an error is
encountered (this happened e.g., with the Tru64 depmode forced on
the Sun C compiler 5.9), so that a passing test means nothing, and
only gives a false sense of security.
As Peter Rosin put it, "it's just dead wrong to assume that feeding
-M or -xM to the compiler (or whatever other random stuff 'depcomp'
might do) and not get an error is the same as dependencies magically
appearing".
So we get rid of this wrong approach, and in the process proceed to
a complete overhaul of many of the tests on automatic dependency
tracking, extending the offered coverage and rationalizing their
organization.
* tests/depcomp.sh: New helper script, used by several new
autogenerated tests.
* tests/gen-testsuite-part: Generate several tests based on the
new 'depcomp.sh' script. Emit makefile code that declares their
dependency on that script, and that extends EXTRA_DIST in order
to distribute it.
* tests/depmod.tap: Remove.
* tests/depend2.test: Remove, it has been subsumed by the new
autogenerated test 'depcomp-disabled.tap'.
* tests/depcomp3.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-dashmstdout.tap'.
* tests/depcomp3.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-lt-makedepend.tap'.
* tests/depcomp6.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-auto.tap'.
* tests/depcomp7.test: Remove, it has been subsumed by the new
autogenerated test 'depmod-lt-auto.tap'.
* tests/depcomp5.test: Remove as obsolescent.
* test/list-of-tests.mk: Adjust.
* .gitignore: List the new autogenerated tests.
Stefano Lattarini [Mon, 6 Feb 2012 22:02:32 +0000 (23:02 +0100)]
test defs: avoid spurious XPASS results with NetBSD make
* tests/defs (make_can_chain_suffix_rules): Ensure to properly
declare the '.SUFFIXES:' in the temporary Makefile used to check
whether $MAKE is able to automatically chain suffix rules. This
avoids spurious XPASS results with (at least) NetBSD make in some
'suffix*.tap' tests; in a sense also, this also makes the probing
of $MAKE capabilities more faithful, since the Automake-generated
Makefiles are expected to properly declare the '.SUFFIXES:' as
well.
Stefano Lattarini [Mon, 6 Feb 2012 21:45:47 +0000 (22:45 +0100)]
cosmetics: few whitespace fixlets
Stefano Lattarini [Mon, 6 Feb 2012 21:06:18 +0000 (22:06 +0100)]
cosmetics: various typofixes
Several typofixes in documentation and comments, as
suggested by the "codespell.py" script. Reference:
<http://git.profusion.mobi/cgit.cgi/lucas/codespell/>
Stefano Lattarini [Mon, 6 Feb 2012 20:54:36 +0000 (21:54 +0100)]
cosmetics: convert encoding from ISO-8859 to UTF-8 in some tests
The changed files have been converted using iconv; specifically,
the command "iconv --from-code=ISO-8859-1 --to-code=UTF-8".
* tests/block.test, tests/tagsub.test: Converted to UTF-8 encoding.
Stefano Lattarini [Mon, 6 Feb 2012 21:28:20 +0000 (22:28 +0100)]
test defs: remove obsolete requirement 'rst2html'
* tests/defs (rst2html): Remove, it's not needed anymore now that
the old code supporting the ".log -> .html" conversion for the
parallel-tests harness has been moved in contrib. This removal
should have actually be done in commit v1.11-1757-g0a9d201 of
17-01-2012, 'check: move ".log -> .html" conversion in contrib'.
Stefano Lattarini [Mon, 6 Feb 2012 18:43:34 +0000 (19:43 +0100)]
tests: workaround for shells with broken 'set -e'
* tests/defs (gmake, native, rst2html): Some versions of the BSD
shell wrongly bail out when the 'errexit' shell flag is active and
the left-hand command in a "&&" list fails, if that list is the
*last* command of a "for" or "while" loop. Work around this issue.
* tests/lex3.test: Likewise.
* tests/check12.test: Likewise.
* tests/yacc-basic.test: Likewise.
* tests/lex-noyywrap.test: Likewise.
* tests/parallel-tests2.test: Likewise.
* tests/lex-lib-external.test: Likewise.
* tests/check-no-test-driver.test: Likewise.
* tests/test-metadata-recheck.test: Likewise.
* tests/parallel-tests-dry-run-1.test: Likewise.
* tests/parallel-tests-dry-run-2.test: Likewise.
* tests/parallel-tests-unreadable.test: Likewise.
* tests/test-driver-custom-no-extra-driver.test: Likewise.
Problem revealed by spurious testsuite failures on a NetBSD 5.1
system and an OpenBSD 5.0 system.
Stefano Lattarini [Mon, 6 Feb 2012 18:26:12 +0000 (19:26 +0100)]
cosmetics: fix a typo in comments
* tests/extra-programs-empty.test: Fix typo in heading comments.
Stefano Lattarini [Sun, 5 Feb 2012 20:22:01 +0000 (21:22 +0100)]
parallel-tests: more uses for '$(am__make_dryrun)'
With this change we refactor some recipes of the parallel-tests
harness to make them use, where appropriate, the new internal
variable '$(am__make_dryrun)' (introduced in the 'maint' branch)
when they need to determine whether make is running in "dry mode",
i.e., with "make -n". This allows for some simplifications and
for improved uniformity.
* lib/am/check.am (check-TESTS recheck): Use $(am__make_dryrun) and
simplify accordingly.
(am--redo-logs): Delete this internal helper recipe, merged into ...
($(TEST_SUITE_LOG)): ... this, with the help of $(am__make_dryrun).
recipe accordingly.
Stefano Lattarini [Sun, 5 Feb 2012 17:37:45 +0000 (18:37 +0100)]
Merge branch 'maint'
* maint:
refactor: new variable telling whether make is running in "dry mode"
tests: do not clobber the modified CC
Stefano Lattarini [Mon, 23 Jan 2012 20:02:05 +0000 (21:02 +0100)]
refactor: new variable telling whether make is running in "dry mode"
We define a new variable '$(am__make_dryrun)', that can be used
in recipes to determine whether make is running in "dry mode" (as
with "make -n") or not. This is useful in rules that invoke make
recursively, and are thus executed also with "make -n" -- either
because they are declared as dependencies to '.MAKE' (NetBSD make)
or because their recipes contain the "$(MAKE)" string (GNU and
Solaris make).
* lib/am/header-vars.am (am__make_dryrun): New variable.
* lib/am/check.am (check-TESTS recheck): Use it, and simplify
recipe accordingly.
* lib/am/distdir.am (distdir): Likewise.
* lib/am/lisp.am ($(am__ELCFILES)): Likewise.
Peter Rosin [Thu, 2 Feb 2012 20:08:46 +0000 (21:08 +0100)]
tests: do not clobber the modified CC
If CC is originally a losing compiler, AM_PROG_CC_C_O will
modify CC. "$MAKE -e" will then clobber this modified CC
and reintroduce the raw losing compiler causing the test
to fail, as subdir-objects is in effect.
tests/check8.test: Drop -e from the $MAKE invocation, since
AM_COLOR_TESTS is not specified in the Makefile and -e is
therefore not needed.
Stefano Lattarini [Thu, 2 Feb 2012 19:14:30 +0000 (20:14 +0100)]
cosmetics: fix indentation and typos in perl TAP driver
* lib/tap-driver.pl (get_test_exit_message): Fix botched
indentation. Fix typo in error message: s/ststus/status/.
Stefano Lattarini [Thu, 2 Feb 2012 18:07:51 +0000 (19:07 +0100)]
test defs: fix typo in variable name ($AM_TESTSUITE_PERL)
* tests/defs-static.in: Fix typo: it's '$AM_TESTSUITE_PERL',
not '$AM_TESTUITE_PERL'.
Stefano Lattarini [Thu, 2 Feb 2012 13:51:59 +0000 (14:51 +0100)]
tap/perl: handle missing or non-executable scripts better
This change improves how our Perl-based TAP driver handles
non-runnable test scripts (meaning they might be not executable,
or not readable, or even not exist). In particular, it makes the
driver deterministically display a clear "ERROR" result instead
of possibly dying with diagnostic from 'TAP::Parser' internals,
and prevents it from displaying spurious "missing TAP plan" errors.
Moreover, with this change, some testsuite failures present only
with newer perl versions (e.g., 5.14) are fixed. See automake
bug#10418.
* tests/tap-bad-prog.tap: When testing the perl implementation of
the TAP driver, and when the perl interpreter offers a good-enough
'IPC::Open3::open3' function, expect it not to display spurious
"missing TAP plan" diagnostic if the error is actually due to a
non-runnable test script.
* lib/tap-driver.pl (start): Removed, broken up into ...
(setup_io): ... this ...
(setup_parser): ... and this, which now tries to catch and report
errors in launching the test scripts.
(finish): New, used by both 'main' and 'setup_parser'.
(main): Adjust.
Peter Rosin [Wed, 1 Feb 2012 15:28:48 +0000 (16:28 +0100)]
Merge branch 'maint'
Peter Rosin [Wed, 1 Feb 2012 14:47:45 +0000 (15:47 +0100)]
tests: put AM_PROG_CC_C_O before AC_OUTPUT to help losing compilers
When AM_PROG_CC_C_O is after AC_OUTPUT, the compile script
is not used even if needed, causing testsuite fails if
libtool is not used.
* tests/depcomp8a.test: Uncomment the AM_PROG_CC_C_O macro
in its correct location, as indicated...
(configure.in): ...with this comment.
* tests/depcomp8b.test: Sync with tests/depcomp8a.test.
Stefano Lattarini [Tue, 31 Jan 2012 11:52:24 +0000 (12:52 +0100)]
cleanup: remove unused .am file
* lib/am/comp-vars.am: Remove. This file has stopped being useful
since commit 'Release-1-4d-206-g3334f9a' of 09-04-2001, and should
have been removed back then. But apparently only its contents were
removed, leaving the file empty but still present in the repository.
Or maybe this situation is the consequence of a minor blunder in
the conversion from CVS to Git; either way, this is not a big deal.
Stefano Lattarini [Tue, 31 Jan 2012 07:31:59 +0000 (08:31 +0100)]
Merge branch 'maint'
* maint:
tests: do not assume the object file extension is .o
tests: avoid spurious failure of 'transform2.test' on Cygwin
tests: avoid spurious failure of deleted-am.test with FreeBSD make
tests: avoid possibly undeserved PASS from check8.test
warnings: more precise category and message for one warning
release: revamp rules to tag and upload the releases
amversion: add missing dependency
hacking: update advice w.r.t. synced files
hacking: don't reference ChangeLog anymore
+ Extra non-trivial edits:
* tests/suffix8.tap: Copy in (by hand) the modifications done
to 'suffix8.test' on maint, i.e., the addition of an explicit
'.y_.obj:' suffix rule to Makefile.am.
Peter Rosin [Mon, 30 Jan 2012 22:27:06 +0000 (23:27 +0100)]
Merge branch 'msvc'
* msvc:
ar-lib: ignore the verbose modifier instead of erroring out
scripts: cherry-pick recent changes from master
tests: add missing dependency for some 'ar-lib*.test' tests
Peter Rosin [Mon, 30 Jan 2012 22:19:03 +0000 (23:19 +0100)]
ar-lib: ignore the verbose modifier instead of erroring out
* lib/ar-lib: A number of tests uses the v modifier when listing
the archive content, ignore it to make them pass.
Peter Rosin [Mon, 30 Jan 2012 22:16:37 +0000 (23:16 +0100)]
scripts: cherry-pick recent changes from master
* lib/ar-lib: prefer the term "Windows" over "Win32" and quote
'like this', not `like this'.
* lib/compile: Likewise.
Stefano Lattarini [Sat, 28 Jan 2012 12:23:16 +0000 (13:23 +0100)]
maintcheck: fix real and spurious warnings
* lib/Makefile.am (install-data-hook): Correctly quote $(DESTDIR)
occurrences.
* Makefile.am (install-exec-hook, uninstall-hook): Likewise.
(autodiffs): Prefer '$(am__cd)' to plain 'cd', where warranted.
* doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Likewise. Also,
prefer using AC_SUBST'd $(abs_top_builddir) over obtaining it at
runtime from $(top_builddir).
* syntax-check.mk (sc_mkinstalldirs): Tweak to whitelist known
harmless occurrences of the checked-against usages.
(sc_no_for_variable_in_macro): Likewise.
* tests/CheckListOfTests.am (maintainer-check-list-of-tests): Tweak
to avoid spuriously triggering the 'sc_no_for_variable_in_macro'
maintainer check. Prefer '$(am__cd)' to plain 'cd' when warranted.
Stefano Lattarini [Sat, 28 Jan 2012 11:38:07 +0000 (12:38 +0100)]
maintcheck: take advantage of some GNU make features
We can do so now that our maintainer checks require GNU make
unconditionally.
* syntax-check.mk (ams, xtests): Redefine as "immediate variables",
using the GNU make $(shell ...) builtin.
(maintainer-check-list-of-tests): Take advantage of GNU make "-C"
option. Don't use $(AM_MAKEFLAGS), we shouldn't need it with GNU
make.
Stefano Lattarini [Sat, 28 Jan 2012 09:05:18 +0000 (10:05 +0100)]
build: require GNU make in order to run the maintainer checks
This is not a real regression in portability, since most maintainer
check rules already assumed GNU grep, and were anyway only meant to
run on the developers' systems (where we can safely assume the
presence of GNU make).
This change will allow us to take advantage, in future changes, of
more GNU make features, thus simplifying or optimizing some of our
maintainer rules.
* GNUmakefile: New, including 'Makefile' and 'syntax-checks.mk'.
* configure.ac (AC_CONFIG_LINKS): Link it in the builddir.
* Makefile.am (EXTRA_DIST): Distribute 'GNUmakefile' and
'syntax-checks.mk'.
Move all syntax-check rules and auxiliary variables into ...
* syntax-checks.mk: ... this new file, with some adjustments.
Stefano Lattarini [Sat, 28 Jan 2012 08:21:29 +0000 (09:21 +0100)]
maintcheck: refactor rules checking '*.am' files
A small refactoring in our syntax-check to avoid code duplication
and to ensure more uniform checking. This change introduces some
new failures in syntax-check rules (both real and spurious), that
will be fixed in follow-up changes and code reorganizations.
* Makefile.am (ams): New variable, holding the list of all the
'*.am' fragments in he automake source tree.
(sc_no_brace_variable_expansions): Use it.
(sc_rm_minus_f): Likewise.
(sc_no_for_variable_in_macro): Likewise.
(sc_mkinstalldirs): Likewise.
(sc_pre_normal_post_install_uninstall): Likewise.
(sc_cd_in_backquotes): Likewise.
(sc_cd_relative_dir): Likewise.
(sc_tests_make_without_am_makeflags): Likewise.
(sc_tests_plain_egrep_fgrep): Likewise.
(sc_mkdir_p): Likewise.
Peter Rosin [Mon, 30 Jan 2012 19:57:12 +0000 (20:57 +0100)]
tests: do not assume the object file extension is .o
* tests/specflg7.test: Dig out the object file extension from the
OBJEXT makefile variable.
* tests/substref.test: Likewise.
* tests/specflg8.test: Likewise. Also check that the false-true
object is created instead of checking the true-true object twice.
* tests/suffix8.test: Add a chain rule for the case where the
object file extension is .obj.
Peter Rosin [Mon, 30 Jan 2012 19:33:17 +0000 (20:33 +0100)]
tests: fetch the 'compile' script for subdir objects
* tests/libobj19.test: Subdir objects are used, so the 'compile'
script needs to be present for inferior hosts. Fetch it.
Peter Rosin [Mon, 30 Jan 2012 19:32:53 +0000 (20:32 +0100)]
tests: fetch the 'ar-lib' script for archiver usage
* tests/libobj10.test: The archiver is used, so the 'ar-lib'
script needs to be present for inferior hosts. Fetch it.
Stefano Lattarini [Fri, 27 Jan 2012 17:35:28 +0000 (18:35 +0100)]
tests: avoid spurious failure of 'transform2.test' on Cygwin
On newer Cygwin versions (at least 1.7.x), the 'transform2.test'
test has been failing spuriously; the gist is the following:
some *purposefully* rigged install rules there try something
like:
install bla.exe .../inst/bin/foo.exe
install script.sh .../inst/bin/foo
and the second install command fails (trying to overwrite the
'.../inst/bin/foo.exe' file, likely due to overly aggressive
appending of '.exe' suffix when copying/renaming Windows
executables). Since this is a Cygwin issue rather than an
Automake one (and since the use case we are testing is a really
corner-case anyway, making it unworthy to attempt to work
around it in automake proper), we simply hack the test case
to avoid the failure.
Analysis by Peter Rosin and Ralf Wildenhues.
References:
<http://lists.gnu.org/archive/html/automake-patches/2010-08/msg00153.html>
<http://thread.gmane.org/gmane.os.cygwin/119380>
* tests/transform2.test: Skip the affected part of the test
if the described Cygwin behaviour is detected.
Stefano Lattarini [Fri, 27 Jan 2012 20:03:45 +0000 (21:03 +0100)]
tests: avoid spurious failure of deleted-am.test with FreeBSD make
* tests/deleted-am.test: Sleep between the removal of the included
'.am' fragments and the subsequent "make" calls, to ensure that the
remake rules kick in. This is required to avoid racy spurious
failures (~ 60% of the time) with FreeBSD make.
Stefano Lattarini [Fri, 27 Jan 2012 13:14:46 +0000 (14:14 +0100)]
tests: avoid possibly undeserved PASS from check8.test
* tests/check8.test: Strengthen grepping of "make check" output
where we know no problem with VPATH rewrites can take place. This
has the advantage of ensuring that we won't match also "sub/bar"
when looking for "bar" during the uncolorized tests.
Suggestion by Peter Rosin.
Stefano Lattarini [Tue, 10 Jan 2012 19:27:08 +0000 (20:27 +0100)]
tests: work around MinGW/MSYS issue in fd redirections
Some checks on $(AM_TESTS_FD_REDIRECT) were failing on MSYS, likely
because system calls like "write(9, ...)" simply doesn't work for
MinGW-compiled programs. Similar usages work for the shell scripts
though, since /bin/sh is an MSYS program and thus is a lot more
POSIX-ish than most MinGW-compiled programs.
The best fix for this issue is to separate the checks using shell
scripts as dummy test cases from the checks using compiled programs
for the same purpose, and skip these latter checks on MinGW.
This change fixes automake bug#10466. Report by Peter Rosin.
* tests/parallel-tests-fd-redirect.test: Move checks using compiled
C programs as test cases to ...
* tests/parallel-tests-fd-redirect-exeext.test: ... this new test.
* tests/list-of-tests.mk: Update.
Stefano Lattarini [Thu, 26 Jan 2012 17:00:40 +0000 (18:00 +0100)]
warnings: more precise category and message for one warning
If automake detected an usage like "AC_CONFIG_FILES([./Makefile])"
in configure.ac, it warned that such an usage was unportable to
non-GNU make implementations. But the truth is actually worse:
that is actually *unportable to GNU make* itself, since it breaks
the automatic remake rules in subtle ways.
So we now reveal this breakage in a new test case, and enhance
the warning by giving it a more precise and correct wording, and
by moving it from the category 'portability' to the category
'unsupported'.
* automake.in (scan_autoconf_config_files): Improve the warning.
* tests/conffile-leading-dot.test: New test.
* tests/list-of-tests.mk: Add it.
Stefano Lattarini [Wed, 25 Jan 2012 11:18:43 +0000 (12:18 +0100)]
release: revamp rules to tag and upload the releases
The older Makefile rules used to create and tag the releases were
based on an approach we now consider flawed: they over-mechanized
some delicate operations that are better performed manually *and*
double-checked by a developer, and at the same time they did not
run enough safety checks.
* Makefile.am (GIT, version_rx, stable_version_rx, beta_version_rx,
match_version, git_must_have_clean_workdir, determine_release_type):
New variables.
(git-release, git-dist): Remove, they are superseded by ...
(git-tag-release, git-upload-release): ... these new targets.
Stefano Lattarini [Wed, 25 Jan 2012 12:45:36 +0000 (13:45 +0100)]
amversion: add missing dependency
* m4/Makefile.am ($(top_srcdir)/m4/amversion.m4): Depend on
configure.ac, since the value of $(VERSION) can change every
time configure.ac is updated.
Stefano Lattarini [Wed, 25 Jan 2012 09:09:17 +0000 (10:09 +0100)]
hacking: update advice w.r.t. synced files
* HACKING: Update and improve advices and explanations about files
in the automake repository that are now owned by automake, but
mirrored from other upstreams. Also, don't list these files
explicitly, rather point the reader to the $(FETCHFILES) variable
in Makefile.am.
* Makefile.am (FETCHFILES): Don't state that "there should be a
lot more here", as this is not true anymore today. Only 'COPYING'
must be synced by hand.
Stefano Lattarini [Wed, 25 Jan 2012 08:50:54 +0000 (09:50 +0100)]
hacking: don't reference ChangeLog anymore
* HACKING: Don't reference the ChangeLog file anymore, since that
is now generated from the git commit messages, not maintained by
hand. So remove advice that is obsolete, and speak about "git
commit message" instead of "ChangeLog entry" for advice that is
still relevant.
Stefano Lattarini [Sat, 21 Jan 2012 10:33:44 +0000 (11:33 +0100)]
multilib: move to contrib
This follows up on commit v1.11-665-gc5df21e of 2012-01-17,
"multilib: deprecate, will be moved to contrib". See also:
<http://lists.gnu.org/archive/html/automake-patches/2012-01/msg00109.html>
* NEWS: Update.
* automake.in ($seen_multilib): Remove.
(scan_autoconf_traces): Don't trace 'AM_ENABLE_MULTILIB', and don't
handle it anymore.
(handle_multilib): Remove.
(generate_makefile): Don't call it anymore.
* doc/automake.texi: Remove documentation about multilib support,
related macros, and helper files.
* m4/multi.m4: Delete.
* m4/Makefile.am (dist_automake_ac_DATA): Remove it.
* lib/am/multilib.am: Delete.
* lib/am/Makefile.am (dist_am_DATA): Remove it.
* contrib/multilib/multilib.am: New file, adapted from extracts of
a Makefile.in generated with automake multilib support. We did
this instead of moving and editing 'lib/am/multilib.am' because it
allows us to license this file with a liberal license that will
permit users to copy-and-paste it in non-GPLed Makefile.am files
too).
* lib/symlink-tree, lib/config-ml.in: Move ...
* contrib/multilib: ... in here.
* lib/Makefile.am (dist_script_DATA, dist_pkgvdata_DATA): Update.
* contrib/multilib/README: New file.
* contrib/Makefile.am (EXTRA_DIST): Add the files created or moved
in 'contrib/multlib'.
* tests/multilib.test: Update and enhance a little.
* tests/help-multilib.test: Likewise.
Peter Rosin [Mon, 23 Jan 2012 08:18:46 +0000 (09:18 +0100)]
tests: improve diagnostics when write(2) fails
MinGW programs can't redirect file descriptor 9, they can only redirect
stdin, stdout and stderr. So, improve the information in the test log.
See automake bug#10466.
* tests/parallel-tests-fd-redirect.test (baz.c, zardoz.c): Check the
return value from the write(2) call, and report detected errors.
Stefano Lattarini [Mon, 23 Jan 2012 08:57:23 +0000 (09:57 +0100)]
Merge branch 'compilers-for-testsuite'
* compilers-for-testsuite:
readme: how to run the testsuite with cross-compilers
tests: no need to unset CFLAGS in tests requiring 'gcc' anymore
test defs: allow compilers to be auto-selected on user's request
test defs: substitute compilers and flags found at configure time
test defs: setup `*FLAGS' variables for GNU compilers
configure: search generic compilers for use in the tests
Stefano Lattarini [Wed, 28 Dec 2011 10:40:20 +0000 (11:40 +0100)]
readme: how to run the testsuite with cross-compilers
* tests/README: Suggest a better way to run the automake testsuite
with cross-compilers -- that is, configuring the Automake source
tree with proper `--build' and `--host' configure option. And
yes, specifying both these options (not only `--host') is indeed
required to avoid spurious failures in corner cases.
When you call configure with the `--host' option but without the
`--build' option, configure tries to auto-detect whether you are
cross-compiling or not, by trying to run a generated executable.
That test might spuriously "succeed" in some corner cases (e.g.,
Cygwin is able to run non-Cygwin apps). In fact, generally, it
can be the case that a cross-compilation is not detected as a
cross anymore just because someone has installed an emulator; as
an example, think of what can happen on a GNU/Linux system that
is configured (through the use of the binfmt_misc kernel module)
to execute PE executables (compiled for MS-DOS or Windows) through
Wine *automatically*. In conclusion, configure needs to be used
as recommended in the documentation (i.e., by specifying *both*
`--host' and `--build' instead of just one of them) to not have
the build fall into any of a number of weird traps.
* tests/defs (cross_compiling): Improve comments.
Co-authored-by: Peter Rosin <peda@lysator.liu.se>
Stefano Lattarini [Wed, 28 Dec 2011 10:40:20 +0000 (11:40 +0100)]
tests: no need to unset CFLAGS in tests requiring 'gcc' anymore
* tests/ccnoco.test: Since this test have "gcc" in $required,
there is no need to manually nullify the CFLAGS variable, since
now `tests/defs' should automatically re-define that to a value
appropriate for gcc.
* tests/ccnoco3.test: Likewise.
Stefano Lattarini [Wed, 28 Dec 2011 10:40:20 +0000 (11:40 +0100)]
test defs: allow compilers to be auto-selected on user's request
In the recent changes, by pre-setting the required compilers for
the `configure' scripts launched by the test scripts, we have
slightly reduced the coverage of autoconf/automake code aimed at
automatically detecting said compilers. This commit restore such
coverage, by allowing the user to instruct the testsuite *not* to
preset the testsuite compiler(s).
* tests/defs (cc): If $CC is set to the special value "autodetect"
or "autodetected", don't export the configure-detected CC, CFLAGS
and CPPFLAGS variables; rather, unset them.
(c++): Likewise, but for CXX, CXXFLAGS and CPPFLAGS instead.
(fortran): Likewise, but for FC and FCFLAGS instead.
(fortran77): Likewise, but for F77 and FFLAGS instead.
(require_compiler_): New function, to reduce code duplication.
Stefano Lattarini [Wed, 28 Dec 2011 10:40:20 +0000 (11:40 +0100)]
test defs: substitute compilers and flags found at configure time
* tests/Makefile.am (do_subst): Also substitute CC, CXX, F77, FC,
CPPFLAGS, CFLAGS, CXXFLAGS, FCFLAGS and FFLAGS.
* tests/defs-static.in: Define those variables, allowing for
overrides from the environment.
* tests/defs (for tool in $required): Export (subsets of) those
variables when the stuff in `$required' calls for it.
Add related explanatory comments.
Stefano Lattarini [Wed, 28 Dec 2011 10:40:20 +0000 (11:40 +0100)]
test defs: setup `*FLAGS' variables for GNU compilers
* configure.ac: Setup some `*FLAGS' variables for use by the
GNU compilers in our testsuite. For example, use `GNU_CFLAGS'
instead of `CFLAGS', and so on for similar variables. This
is especially useful in case the compilers found or defined
at configure time are not the GNU ones.
* tests/defs-static.in: Initialize those same variables with
the values set at configure time, but allowing overrides
from the environment.
* tests/Makefile.am (do_subst): Process configure-style
substitutions of those variables (e.g., `@GNU_CFLAGS@').
* tests/defs: When a GNU compiler is required, override the
corresponding generic `*FLAGS' variable with the GNU-specific
variant (e.g., redefine `$CFLAGS' to take the value of
`$GNU_CFLAGS').
Stefano Lattarini [Wed, 28 Dec 2011 10:40:20 +0000 (11:40 +0100)]
configure: search generic compilers for use in the tests
* configure.ac: Look for "generic" C, C++ and Fortran compilers,
with the aim of starting to use them in the testsuite (this will
be done in future changes). This is more tricky than it seems,
since we don't want to abort the whole configure script even if
no one of those compilers is available (after all, they're only
needed by the testsuite, not to build automake), but currently
autoconf doesn't offer an easy way to obtain this behaviour.
We prefer non-GNU compilers to the GNU ones, to ensure better
coverage "in the wild".
Stefano Lattarini [Sun, 22 Jan 2012 16:59:46 +0000 (17:59 +0100)]
tests: remove redundant 'set -e' calls
* tests/aclocal-install-absdir.test: Do not set the 'errexit' shell
flag, as it is already set by 'tests/defs'.
* tests/distcheck-pr10470.test: Likewise.
* tests/objext-pr10128.test: Likewise.
* tests/parallel-tests-dry-run-1.test: Likewise.
* tests/silent-nested-vars.test: Likewise.
* tests/tar-override.test: Likewise.
* tests/vala-mix.test: Likewise.
* tests/vala-vpath.test: Likewise.
Stefano Lattarini [Sun, 22 Jan 2012 16:46:53 +0000 (17:46 +0100)]
Merge branch 'maint'
* maint:
tests: fix spurious failure due to autom4te caching
vala: fix name of temporary file used in vala rules
vala tests: add missing 'valac' requirement, and other minor fixlets
news: fix grammaro
Stefano Lattarini [Sun, 22 Jan 2012 16:18:59 +0000 (17:18 +0100)]
tests: fix spurious failure due to autom4te caching
* tests/lzma.test: Remove stale autom4te.cache directories, to
prevent racy, spurious failures (using 'aclocal --force' was
not enough, since the cache was still picked up by the following
automake call).
Stefano Lattarini [Sun, 22 Jan 2012 09:06:24 +0000 (10:06 +0100)]
dist tests: missing 'compress' program was causing spurious failures
Fixes automake bug#10575.
The compress(1) tool is becoming anachronistic, and thus is not
installed by default on modern distros (e.g., Fedora 16). We
can't thus unconditionally assume it exists on every reasonable
portability target.
* tests/dist-formats.tap ($missing_compressors): When defining
this, don't assume anymore that compress(1) is unconditionally
available.
(Parallel compression): Skip this sub-test if compress(1) is
unavailable.
Since we are at it, fix a couple of unrelated buglets: a typo
in a test name (s/distcheck/ark-exists/), and some attempts to
remove directories with "rm -f".
Stefano Lattarini [Sun, 22 Jan 2012 09:44:42 +0000 (10:44 +0100)]
vala: fix name of temporary file used in vala rules
Unquoted `@' characters in a "..." string in the automake script
were causing slightly wrong rules to be emitted in the generated
Makefile.in; i.e., rules like:
rm -f $@ && echo stamp > $10t
instead of the expected:
rm -f $@ && echo stamp > $@-t
* automake.in (lang_vala_finish_target): Fix that.
* tests/vala.test: Enhance.
Stefano Lattarini [Sun, 22 Jan 2012 09:21:26 +0000 (10:21 +0100)]
vala tests: add missing 'valac' requirement, and other minor fixlets
See also automake bug#10575.
* tests/vala-mix.test ($required): Add 'valac'; this will avoid
spurious failures on systems lacking a Vala compiler.
Add some explicative comments for a couple of non-obvious make
calls.
Make grepping of "make -n" slightly stricter, to avoid potential
false positives.
Stefano Lattarini [Sun, 22 Jan 2012 09:11:46 +0000 (10:11 +0100)]
news: fix grammaro
* NEWS (Miscellaneous changes): Fix grammaro: s/don't/doesn't/.
Reported by Jim Meyering.
Stefano Lattarini [Sat, 21 Jan 2012 19:52:43 +0000 (20:52 +0100)]
Merge branch 'maint'
* maint:
fixup: distribute 'contrib/multilib/multi.m4'
multilib: deprecate, will be moved to contrib
fixlet: flags for Fortran77 compiler are in FFLAGS, not F77FLAGS
cosmetics: fix a botched comment in a maintainer check
Stefano Lattarini [Sat, 21 Jan 2012 18:40:35 +0000 (19:40 +0100)]
fixup: distribute 'contrib/multilib/multi.m4'
This fix up a blunder in commit v1.11-665-gc5df21e of 2012-01-17,
"multilib: deprecate, will be moved to contrib".
* contrib/Makefile.am (EXTRA_DIST): Add 'multilib/multi.m4'.
Stefano Lattarini [Tue, 17 Jan 2012 18:48:06 +0000 (19:48 +0100)]
multilib: deprecate, will be moved to contrib
As of 2012-01-17, according to Google codesarch, almost no active
package is using the 'multilib' feature offered by automake.
The only major exception seems to be GCC... But on a closer look,
it become clear that GCC basically carries its own version of
multilib support. In fact, Automake syncs its 'config-ml.in' and
'symlink-tree' scripts from GCC; and the GCC repository contains a
version of the 'multi.m4' file that is *more* updated than the one
in the automake repository (the former having being modified the
last time in 2008, the latter only in 2006).
The 'multilib' feature was anyway hardly documented at all, only
being briefly cited in the manual as an "obscure feature", "still
experimental", that was only for users "familiar with multilibs"
and which "can debug problems they might encounter". We expect
such users to be motivated and knowledgeable enough to make the
minor adjustments required to start using the contrib version of
multilib, if they really need to.
* NEWS (Future backward incompatibility): Update.
* doc/automake.texi: Deprecate multilib support. State that it
will be removed from automake core in the next major release.
* m4/multi.m4 (AM_ENABLE_MULTILIB): Deprecate. If called, now
gives a proper warning in the 'obsolete' category (while still
retaining its former behaviour for the rest).
* tests/multilib.test: Update.
* contrib/multilib/multi.m4: New, verbatim copy of the earlier
version of multi.m4, without the new deprecation warning.
* Makefile.am (fetch): Don't sync the 'config-ml.in' file nor
the 'symlink-tree' script from GCC SVN repository anymore.
(FETCHFILES): Adjust.
(WGET_GCC): Remove, it's not needed anymore.
Stefano Lattarini [Fri, 20 Jan 2012 19:52:02 +0000 (20:52 +0100)]
fixlet: flags for Fortran77 compiler are in FFLAGS, not F77FLAGS
This change fixes automake bug#10555.
Note that the bug was a minor one, since it didn't affect the
compilation rules generated by automake, but only only the "hints"
printed by automake in some error messages (e.g., "The usual way
to define `FFLAGS' is to add AC_PROG_F77 to configure.ac").
* lib/Automake/Variable.pm (%_ac_macro_for_var): The code generated
by AC_PROG_F77 uses FFLAGS, not F77FLAGS, as the variable where to
look for switches for the Fortran 77 compiler: adjust accordingly.
Stefano Lattarini [Thu, 19 Jan 2012 14:09:23 +0000 (15:09 +0100)]
cosmetics: fix a botched comment in a maintainer check
* Makefile.am (sc_tests_make_without_am_makeflags): Adjust
botched description of this check.
Stefano Lattarini [Wed, 18 Jan 2012 17:42:46 +0000 (18:42 +0100)]
Merge branch 'maint'
* maint:
cmdline parsing: move into a dedicated perl module
Stefano Lattarini [Wed, 18 Jan 2012 16:55:40 +0000 (17:55 +0100)]
cmdline parsing: move into a dedicated perl module
With this change, we delegate most of the automake and aclocal code
for command-line options parsing to a new module "Automake::Getopt".
This allows better code sharing between automake and aclocal, and
also with Autoconf, which will sync the new module from us. See
also autoconf commit 'v2.68-120-gf4be358' (2012-01-17, "getopt: new
Autom4te::Getopt module"), and this mailing list discussion:
<http://lists.gnu.org/archive/html/autoconf-patches/2012-01/msg00033.html>
This change might interact with the behaviour described in automake
bug#7434; for example, starting from now, "automake -Wfoo --version"
will cause automake to emit diagnostic like "unknown warning
category 'foo'" before actually printing the version number and
exiting. This is not a big deal in practice, and the code sharing
and simplifications introduced by this patch is certainly worth it.
Still, we should revisited the issue in the future.
* lib/Automake/Getopt.pm: New module, basically a slightly-edited
copy of the 'lib/Autom4te/Getopt.pm' file from the autoconf devel
repository (commit v2.68-120-gf4be358). It defines and exports ...
(parse_options): ... this new function.
* automake.in (parse_arguments): Use the new function.
* aclocal.in (parse_arguments): Likewise.
* lib/Automake/Makefile.am (dist_perllib_DATA): Add the new file.
* tests/getopt.test: Remove.
* tests/list-of-tests.mk: Update.
Stefano Lattarini [Wed, 18 Jan 2012 16:25:24 +0000 (17:25 +0100)]
tests: don't use custom TAP diagnostic in our own tests
We simply don't need it (yet), we are not actually using it (the
set up for using it is there in the Makefile, but no test script
makes actual use of that).
* tests/Makefile.am (TAP_LOG_DRIVER_FLAGS): Remove '-comments' and
'--diagnostic-string' options.
* tests/defs ($diag_string_): Remove redefinition.
Stefano Lattarini [Wed, 18 Jan 2012 13:47:10 +0000 (14:47 +0100)]
tests: better name for a couple of tests
Two tests checking "make -n" behaviour with the parallel-tests
harness has been introduced in the Automake repository in the past:
one of them ('parallel-tests-dryrun.test') in the maint branch, the
other one ('parallel-tests-dry-run.test') in the master branch.
Needless to say, their too-much-similar names can be a great source
of confusion now. Moreover, the two tests have been written during
distinct refactorings, and are meant to exercise different code
paths and/or usage scenarios, so that no one of them subsumes the
other, and they should be both kept.
Thus we simply rename both of them to avoid future confusion.
* tests/parallel-tests-dryrun.test: Renamed ...
* tests/parallel-tests-dry-run-1.test: .. to this.
* tests/parallel-tests-dry-run.test: Renamed ...
* tests/parallel-tests-dry-run-2.test: .. to this.
Add cross-reference among them.
* tests/list-of-tests.mk: Adjust.
Stefano Lattarini [Wed, 18 Jan 2012 13:15:03 +0000 (14:15 +0100)]
build: simplify our top-level "recheck" target
* Makefile.am (recheck): Now that all the test scripts are in
the 'tests/' directory, its recipe can be greatly simplified,
as we don't need to deal with recursion in multiple subdirectories
anymore.
Stefano Lattarini [Wed, 18 Jan 2012 13:08:57 +0000 (14:08 +0100)]
Merge branch 'maint'
* maint:
cosmetics: move CheckListOfTests.am into tests/
tests: move all under the same hierarchy ('tests/' directory)
gitlog-to-changelog: update from upstream
changelog: don't cluster multiple entries under the same "date line"
+ Extra non-trivial edits:
* tests/Makefile.am (XFAIL_TESTS): Update with the xfailing tests
that were in 'lib/Automake/tests'. Add proper "FIXME" comment.
Stefano Lattarini [Wed, 18 Jan 2012 12:40:21 +0000 (13:40 +0100)]
cosmetics: move CheckListOfTests.am into tests/
After the previous change 'v1.11-660-gfbeda3d', the makefile
fragment 'CheckListOfTests.am' is used only by the Makefile.am
in 'tests'; so keeping them two nearer makes sense. It also help
in reducing potential confusion, since (after that same change)
the whole Automake testsuite is expected to be (and remain)
contained into the 'tests' subdirectory.
* CheckListOfTests.am: Move ...
* tests/CheckListOfTests.am: ... to this.
* tests/Makefile.am (include): Adjust.
Stefano Lattarini [Wed, 18 Jan 2012 11:17:11 +0000 (12:17 +0100)]
tests: move all under the same hierarchy ('tests/' directory)
This simplifies the organization of the Automake source tree and
reduces the (lamentably high) number of Makefiles in the Automake
build system by one. It also makes the maintainer check that
verifies the consistency of list of tests more self-contained and
simpler. Finally, it might be a first step forward the transition
to a non-recursive build system for automake (if we ever decide to
go down that road fully some day).
* lib/Automake/tests: All the '*.pl' tests in here moved ...
* tests/pm: ... into this new directory.
* lib/Automake/tests/Makefile.am: Remove, its meaningful
contents moved ...
* tests/Makefile.am: ... here, with obvious adjustments.
(test_subdirs): New variable, for the sake of the recipe
of 'maintainer-check-list-of-tests'.
* CheckListOfTests (maintainer-check-list-of-tests): Enhance
its recipe to make it able to deal with test script residing
in subdirectories.
* Makefile.am (maintainer-check-list-of-tests): Simplified.
(TEST_SUBDIRS): Remove, no more needed.
* tests/list-of-tests.mk (perl_TESTS): New variable, lists
the '.pl' tests just moved into 'tests/pm'.
(handwritten_TESTS): Add the contents of '$(perl_TESTS)'.
* lib/Automake/Makefile.am (SUBDIRS): Remove.
* configure.ac (AC_CONFIG_FILES): Update.
* .gitignore: Adjust.
Stefano Lattarini [Wed, 18 Jan 2012 08:45:01 +0000 (09:45 +0100)]
gitlog-to-changelog: update from upstream
* lib/gitlog-to-changelog: Update from gnulib upstream. The only
changes should be cosmetic and/or minor fixlets.
Stefano Lattarini [Tue, 17 Jan 2012 22:31:19 +0000 (23:31 +0100)]
changelog: don't cluster multiple entries under the same "date line"
* lib/gitlog-to-changelog: Synced from gnulib. The new version
has a new option '--no-cluster', that disables clustering of
adjacent commit messages under the same "date line".
* Makefile.am (gitlog_to_changelog_options): Add '--no-cluster'.
Also add a proper '--format' specification to ensure we have a
blank line between the summary line and the commit message body.
Stefano Lattarini [Tue, 17 Jan 2012 14:52:53 +0000 (15:52 +0100)]
Merge branch 'maint'
* maint:
fixup: contrib: really integrate in automake build system
Stefano Lattarini [Tue, 17 Jan 2012 14:48:56 +0000 (15:48 +0100)]
fixup: contrib: really integrate in automake build system
* configure.ac (AC_CONFIG_FILES): Add 'contrib/Makefile'.
* Makefile.am (SUBDIRS): Add 'contrib'.
Stefano Lattarini [Tue, 17 Jan 2012 14:06:05 +0000 (15:06 +0100)]
check: move ".log -> .html" conversion in contrib
That feature has been deprecated in the 1.11.x series, and marked
for removal from the automake core in the 1.12 release. Here we
implement such removal.
Reference:
<http://lists.gnu.org/archive/html/automake/2012-01/msg00005.html>
See also commit 'v1.11-650-g20f2ac9'.
* doc/automake.texi, NEWS: Update.
* lib/am/check.am: Don't include 'check-html.am' anymore.
* lib/am/check-html.am: Move ...
* contrib/check-html.am: ... to this, and adjust comments.
* lib/am/Makefile.am (dist_am_DATA): Update.
* contrib/Makefile.am (EXTRA_DIST): Likewise.
* tests/parallel-tests2.test: Adjust.
* tests/parallel-tests-dryrun.test: Remove checks on the
".log -> .html" conversion.
* tests/test-driver-custom-html.test: Remove as obsolete.
* tests/test-driver-custom-no-html.test: Likewise.
* tests/tap-html.test: Likewise.
* tests/list-of-tests.mk: Don't list removed tests anymore.
Stefano Lattarini [Tue, 17 Jan 2012 13:20:40 +0000 (14:20 +0100)]
Merge branch 'maint'
* maint:
contrib: new, a directory for non-mainstream functionalities
Stefano Lattarini [Tue, 17 Jan 2012 12:46:11 +0000 (13:46 +0100)]
tap: some makes in parallel mode unconditionally serialize output
Some make implementations (among them, FreeBSD make, NetBSD make,
and Solaris Distributed Make), when run in parallel mode, serialize
the output from their targets' recipes unconditionally. This has
the nasty side effect that the user won't see the partial results
of a TAP test until the test has terminated. This is not something
our TAP driver script can work around unfortunately; in fact, the
driver is sending out its output progressively and "in sync" with
test execution -- it is make that is stowing such output away
instead of presenting it to the user as soon as it gets it.
So we content ourself with working around the issue in our
testsuite, to at least avoid failures we could do nothing to
prevent.
* tests/tap-realtime.test: Skip this test if the make program used
is a non-GNU make running in parallel mode. And if Sun dmake is
being used, try to force it to run in serial mode, by exporting the
'DMAKE_MODE' environment variable to "serial".
Stefano Lattarini [Tue, 17 Jan 2012 12:55:00 +0000 (13:55 +0100)]
contrib: new, a directory for non-mainstream functionalities
This new 'contrib' hierarchy will be a good place were to move
implementation/support for obsolescent features we are not yet
ready to remove completely, or were to leave experimental or
third-party features to cook before their eventual inclusion in
the automake core.
* contrib: New directory.
* contrib/README: New file.
* contrib/Makefile.am: New file.
(EXTRA_DIST): Distribute README.
Stefano Lattarini [Tue, 17 Jan 2012 10:14:32 +0000 (11:14 +0100)]
docs: APIs for custom test drivers are highly experimental
* doc/automake.texi (API for Custom Test Drivers): The APIs
described here are not "somewhat experimental", but rather
"highly experimental". Don't promise the sure a sort of
backward-compatibility that we are very likely not going to
keep.
Stefano Lattarini [Tue, 17 Jan 2012 10:07:01 +0000 (11:07 +0100)]
tests: avoid spurious failures with parallel make
Some tests are unprepared to be run with a make command that runs
in parallel mode by default. This can happen e.g., if the user
explicitly run the tests with something like:
AM_TESTSUITE_MAKE="gmake -j3" in the
in the environment, but also if the make used in the testsuite is
Sun Distributed Make, and the 'DMAKE_MODE' environment variable is
set to "parallel".
Fix some instances of this issue.
* tests/tap-doc.test (Makefile.am): Declare explicit dependencies
among the test cases, to ensure they are run in the correct order.
* tests/tap-doc2.test: Set the 'DMAKE_MODE' environment variable
to "serial", to prevent Sun dmake from trying to run in parallel.
Remove other now-superfluous workarounds for dmake.
Stefano Lattarini [Tue, 17 Jan 2012 09:33:46 +0000 (10:33 +0100)]
tests: fix spurious failures with Solaris dmake
Solaris Distributed Make, when run in parallel mode, can sprinkle
its standard output with lines like:
hostname --> 2 jobs
...
hostname --> Job output
...
This behaviour was causing spurious errors in some tests where we
compare the output of make with a known, expected value. Fix that.
* tests/tap-doc.test: Before comparing the output from make with its
expected value, remove extra lines that could have been printed by
Solaris dmake.
* tests/tap-doc2.test: Likewise.
Stefano Lattarini [Mon, 16 Jan 2012 19:06:08 +0000 (20:06 +0100)]
Merge branch 'maint'
* maint:
recheck: fix interaction with "make -n"
vala: avoid potential useless remakes (minor bugfix)
vala: enhance tests
recheck: behave better with non-GNU make
check: separate .log -> .html conversion from core testsuite harness
docs: deprecate .log -> .html conversion by parallel-tests
tests: list some forgotten test cases in $(TESTS)
maintcheck: consistency of list of test scripts
build: explicitly declare some targets as .PHONY
maint: remove obsolete/broken maintainer targets
build: improve silencing of automake build system
tests: move list of tests in its own Makefile fragment
+ Extra non-trivial edits:
* tests/parallel-tests2.test: Obvious edits to merge the slightly
inconsistent enhancements to coverage done in master with those
done in maint.
* lib/am/check.am (check-TESTS, recheck): Sweeping and rather
complex changes to merge the considerable divergences between
maint and master in a way that is meaningful and, where possible,
retains the semantic changes from both maint and master.
Stefano Lattarini [Mon, 16 Jan 2012 17:35:50 +0000 (18:35 +0100)]
Merge branch 'check-html-deprecate' into maint
* check-html-deprecate:
recheck: fix interaction with "make -n"
recheck: behave better with non-GNU make
check: separate .log -> .html conversion from core testsuite harness
docs: deprecate .log -> .html conversion by parallel-tests
Stefano Lattarini [Fri, 13 Jan 2012 21:39:47 +0000 (22:39 +0100)]
recheck: fix interaction with "make -n"
* lib/am/check.am (recheck): Ensure the recipe does not erroneously
remove '.log' files when running under "make -n". For the sake of
NetBSD make, this also means that ...
(.MAKE): ... this cannot depend on 'recheck' anymore.
* tests/parallel-tests-dryrun.test: New test.
* tests/list-of-tests.mk: Add it.
Stefano Lattarini [Mon, 16 Jan 2012 15:42:25 +0000 (16:42 +0100)]
vala: avoid potential useless remakes (minor bugfix)
* automake.in (lang_vala_finish_target): Ensure the timestamp file
from which the C files generated from Vala sources depend on gets
created with a modification time that is truly older than those of
said generated C files. This prevents make from attempting useless
rebuilds (which were bound to happen deterministically on systems
with sub-second timestamp resolutions). It is worth noting that,
luckily, those useless rebuild ended up being a no-op, since the
Vala compiler is careful not to update the timestamp of an output
file if its content has not changed from the previous version.
Still, the useless rebuilds messed up "make -q" and "make -n"
invocations, and were technically incorrect (despite being, as
noted, inoffensive in practice).
Problem revealed by failure of tests vala-mix.test and vala5.test
on a fast Solaris 10 system whose filesystem had a sub-second
timestamp resolution.
Stefano Lattarini [Mon, 16 Jan 2012 14:38:56 +0000 (15:38 +0100)]
vala: enhance tests
* tests/vala.test: Extend test. Throw in some cosmetic and
consistency changes since we are at it.
* tests/vala5.test: Avoid uselessly requiring libtool. Ensure a
failure happens in case VALAFLAGS are not supported as expected.
Extend test in some ways. Throw in some cosmetic and consistency
changes since we are at it.
* tests/vala-mix.test: New test.
* tests/list-of-tests.mk: Add it.
Stefano Lattarini [Fri, 13 Jan 2012 17:53:43 +0000 (18:53 +0100)]
recheck: behave better with non-GNU make
* automake.in (handle_tests): Also substitute '%CHECK_DEPS%' with
the value of the '@check' array, containing the list of early
test dependencies like '$(check_SCRIPTS)', $(check_PROGRAMS)',
etc.
* lib/am/check.am (recheck): Explicitly depend on '%CHECK_DEPS%'.
(check, recheck): Unify the implementation of their recipes, with
different code paths taken depending on the name of the target.
This makes the implementation of "recheck" less brittle in the
process (especially when non-GNU make and AM_MAKEFLAGS overriding
are involved).
* lib/am/check-html.am (check-html, recheck-html): Likewise.
* tests/check.test: Adjust to avoid spurious failure.
* tests/parallel-tests2.test: Improve coverage.
Stefano Lattarini [Fri, 13 Jan 2012 16:56:13 +0000 (17:56 +0100)]
check: separate .log -> .html conversion from core testsuite harness
That feature is to be deprecated in the 1.11.x series, and removed
from the automake core in the 1.12 release, where it will instead
be offered in a semi-independent extra '*.am' fragment. So let's
start better separating the .log -> .html conversion from the "core
code" of the parallel-tests harness.
Reference:
<http://lists.gnu.org/archive/html/automake/2012-01/msg00005.html>
* lib/am/check.am (.log.html, check-html, recheck-html): Move these
targets ...
* automake.in (handle_tests): ... and the initialization of the
TEST_SUITE_HTML variable and the cleaning of the $(TEST_SUITE_HTML)
file ...
* lib/am/check-html.am: ... in this new file, with related (minor)
refactorings, enhancements and simplifications.
* lib/am/check.am (.MAKE. PHONY, AM_RECURSIVE_TARGETS): Adjust.
* lib/am/Makefile.am (dist_am_DATA): Add 'check-html.am'.
* tests/parallel-tests2.test: Improve coverage.
Stefano Lattarini [Sun, 8 Jan 2012 18:26:18 +0000 (19:26 +0100)]
docs: deprecate .log -> .html conversion by parallel-tests
That feature is to be deprecated in the 1.11.x series, and
removed in the 1.12 release.
Reference:
<http://lists.gnu.org/archive/html/automake/2012-01/msg00005.html>
* doc/automake.texi (Simple Tests using parallel-tests): Deprecate
the '.log' -> '.html' conversion and the targets 'check-html' and
'recheck-html'. Related rewording and reformatting.
* NEWS (Future backward-incompatibilities): Update.
Stefano Lattarini [Mon, 16 Jan 2012 09:18:06 +0000 (10:18 +0100)]
tests: list some forgotten test cases in $(TESTS)
This way, they will be properly executed by "make check", and
properly distributed. Our previous commit 'v1.11-647-g27f1a1c'
is already paying its dividends!
* tests/list-of-tests.mk (handwritten_TESTS): Add check12.test,
dist-missing-included-m4.test, dist-missing-am.test, and
dist-missing-m4.test.
Stefano Lattarini [Mon, 16 Jan 2012 09:05:59 +0000 (10:05 +0100)]
maintcheck: consistency of list of test scripts
This is basically a backport of commit 'v1.11-358-g7b6ab07'
and its follow-ups. The possibility of easily checking that
the list of test scripts listed in a Makefile equals that of
the tests on the filesystem has proved itself so useful that
it's worth taking the annoyance of backporting it to maint.
* CheckListOfTests.am: New file, backported from master (commit
'v1.11-1736-g083a75b') with minor adjustments.
(maintainer-check-list-of-tests): New target, check for consistency
between the list of tests defined in the including Makefile and the
list of tests on the filesystem.
(clean-maintcheck-testslist-tmp): New rule, to clean up temporary
files that might be left around by the rules associated with the
previous target.
(clean-local): Depend on it.
* lib/Automake/tests/Makefile.am: Include `CheckListOfTests.am'.
* tests/Makefile.am: Likewise.
* Makefile.am (maintainer-check-list-of-test): New target,
calling recursively into `tests/' and `lib/Automake/tests/',
using ...
(TEST_SUBDIRS): ... this new variable.
(maintainer-check): Added dependency from the new target
`maintainer-check-list-of-tests'.
Stefano Lattarini [Mon, 16 Jan 2012 08:40:21 +0000 (09:40 +0100)]
maintcheck: completeness check on list of tests simplified
* CheckListOfTests.am: Simplify the recipe, accordingly to the
assumption that all the entries in $(TEST_EXTENSIONS) and in
$(TESTS) have an associated real test script. This was not the
case when we used to have some entries in $(TESTS) that were not
real files, but rather "parameters" (sort of) for the corresponding
$(LOG_COMPILER). However, that usage had proven to be confusing
and brittle, and thus removed (see commit 'v1.11-1308-g375f23d' of
September 8 2011, "testsuite: revamp generation of autogenerated
tests").
Stefano Lattarini [Sun, 15 Jan 2012 22:45:31 +0000 (23:45 +0100)]
build: explicitly declare some targets as .PHONY
* Makefile.am (fetch, git-dist, git-release, maintainer-check):
Declare as ".PHONY".
Stefano Lattarini [Sun, 15 Jan 2012 22:38:58 +0000 (23:38 +0100)]
maint: remove obsolete/broken maintainer targets
* Makefile.am (git-diff): Remove. First, we don't distribute diffs
between an automake version and the next one anyway, so this target
is pointless. Moreover, its recipe has been broken for quite a
long time now, always generating an empty diff due to the spurious
'$(PACKAGE)' argument that was passed to the "git diff" invocation.
(path-check): Remove. The 'pathchk' program running in this check
complains about any file with name longer than 14 characters, which
is a ridiculously low limit for today standards. Also, we already
had several test scripts (no less than 195!) that were exceeding
that limit, and nobody ever complained (not even on MinGW/MSYS nor
Cygwin).
Stefano Lattarini [Sun, 15 Jan 2012 22:08:21 +0000 (23:08 +0100)]
build: improve silencing of automake build system
In this change, we continue the silencing of the automake build
system that has been started in commit v1.11-642-g17542c3, but
which has been left incomplete there for an (absent-mindness)
mistake.
* Makefile.am (INSTALL): Silence the recipe.
(automake, aclocal): Likewise, and improve them a little since
we are at it.
* lib/Automake/Makefile.am (Config.pm): Likewise.
Stefano Lattarini [Sun, 15 Jan 2012 20:07:44 +0000 (21:07 +0100)]
tests: move list of tests in its own Makefile fragment
This change will make it easier to merge maint into master, which
has a similar Makefile setup in the testsuite.
* tests/Makefile.am (include): Inclusion of ...
* tests/list-of-tests.mk: ... this new file.
* tests/Makefile.am (TESTS): Move most of its content into,
and redefine in function of, ...
* tests/list-of-tests.mk (handwritten_TESTS): ... this new
variable.
* tests/gen-parallel-tests: Update.
Stefano Lattarini [Sun, 15 Jan 2012 21:42:34 +0000 (22:42 +0100)]
Merge branch 'maint'
* maint:
tests: move list of tests in its own Makefile fragment
build: silence automake build system
Stefano Lattarini [Sun, 15 Jan 2012 20:07:44 +0000 (21:07 +0100)]
tests: move list of tests in its own Makefile fragment
This change will make it easier to merge maint into master, which
has a similar Makefile setup in the testsuite.
* tests/Makefile.am (include): Inclusion of ...
* tests/list-of-tests.mk: ... this new file.
* tests/Makefile.am (TESTS): Move most of its content into,
and redefine in function of ...
* tests/list-of-tests.mk (handwritten_TESTS): ... this new
variable.
* tests/gen-parallel-tests: Update.
Stefano Lattarini [Sun, 15 Jan 2012 19:46:43 +0000 (20:46 +0100)]
build: silence automake build system
* configure.ac (AM_SILENT_RULES): Invoke with "yes" as a parameter,
to activate silent rules by default.
* NEWS: Update.
* Makefile.am (sc_perl_syntax): Silence its recipe unconditionally,
similarly to what is done for other syntax checks.
(release-stats): Be silent by default *but not unconditionally*,
thanks to the use of $(AM_V_GEN).
(path-check, git-diff): Be silent by default, thanks to the use
of $(AM_V_GEN).
* m4/Makefile.am ($(top_srcdir)/m4/amversion.m4): Likewise.
* doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Likewise.
* tests/Makefile.am ($(srcdir)/parallel-tests.am): Likewise.
($(parallel_tests)): Likewise.
Stefano Lattarini [Sun, 15 Jan 2012 16:40:09 +0000 (17:40 +0100)]
Merge branch 'maint'
* maint:
gnupload: moved to gnulib
sync: gitlog-to-changelog from gnulib upstream
test defs: backport optimized 'using_gmake' implementation
tests: unify some tests on "make -n", reducing duplication
vala: use "$(am__cd) $(srcdir)", not "cd $(srcdir)"
+ Extra edits:
* tests/maken3.test: Carry over (with necessary adjustments) the
code from maken4.test that determines whether $MAKE supports the
special '.MAKE' target.
Stefano Lattarini [Sun, 15 Jan 2012 16:14:04 +0000 (17:14 +0100)]
gnupload: moved to gnulib
Since the gnupload script is not required by automake-generated
code (be it configure or Makefile content), and is not specifically
tied to automake in any way, it is better to have its master copy
installed in the gnulib repository, as is already done for similar
generally-useful, maintainer-oriented scripts. We can them sync it
from there.
See also gnulib commit v0.0-6822-gf8b7120, and:
<http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00222.html>
* Makefile.am (FETCHFILES): Added 'gnupload'.
(fetch): Also sync 'gnupload' from the gnulib repository.
* lib/gnupload: Synced from gnulib.
* NEWS: Update.
Stefano Lattarini [Sun, 15 Jan 2012 16:10:21 +0000 (17:10 +0100)]
sync: gitlog-to-changelog from gnulib upstream
* lib/gitlog-to-changelog: Synced from upstream, by "make fetch".
Stefano Lattarini [Sat, 14 Jan 2012 09:32:13 +0000 (10:32 +0100)]
test defs: backport optimized 'using_gmake' implementation
* tests/defs.in (using_gmake): Backport optimized, result-caching
implementation from master.