This commit modifies the automake script will always act as if the
'--add-missing' option were give, and simplifies the documentation
accordingly.
Future commits will take care of cleaning up the code accordingly.
The new semantics introduced with this change should have ideally
been the default in automake mainline as well, but they are not,
likely for historical reasons (as is the case for too many Automake
warts).
The new semantics also prepare the way for an exciting planning
change: the distribution of (at first only few) makefile fragments
to be included at make runtime in the Automake-generated Makefiles,
instead of having their contents copied over and over in said
Makefiles.
* automake.in ($add_missing): Define to '1' unconditionally.
(parse_arguments): The '-a' a.k.a. '--add-missing' option is
now a no-op.
* doc/automake-ng.texi: Adjust, in particular with the addition
of ...
(Auxiliary files): ... this new node.
* NG-NEWS: Update.
* t/add-missing.tap: Simplify: don't check that , if any required
auxiliary file is missing and automake is called without the '-a'
or '--add-missing' option, it complains and error out; this is not
the case anymore. Also, don't call automake with the '-a' or
'--add-missing' option; there's no need to now.
* t/dist-auxfile.sh: Adjust.
* t/license2.sh: Likewise.
* t/per-target-flags.sh: Likewise.
* t/python.sh: Likewise.
* t/missing-auxfile-stops-makefiles-creation.sh: Remove as obsolete.
* t/mdate.sh: Likewise.
First, It add lots of complexity to the Automake script, which might
get in the way of future refactorings.
Also, the performance enhancements it offers seems to be fairly
limited:
<http://lists.gnu.org/archive/html/automake/2009-11/msg00004.html>
albeit not excessively so:
<http://www.open-mpi.org/community/lists/devel/2010/09/8524.php>
In the end, the most relevant reason for this change is that we want to
reach a point, during the yet-to-come maturity of Automake-NG, where it
will be just a thin layer around the provided scripts and makefile
fragments (with just a *tiny* smattering of preprocessing), as well as
around autom4te (for the proper parsing of configure.ac). At such a
point, a threaded execution would bring no real benefit.
Oh, and we should really be pushing peoples towards non-recursive
build systems, where they just have one 'Makefile.am', and thus
threading on different 'Makefile.am's is irrelevant ;-)
* NG-NEWS: Update.
* doc/automake-ng.texi, NG-NEWS: Likewise.
* configure.ac: Don't check for 'ithreads' support in perl.
Drop AC_SUBST 'PERL_THREADS'.
* bootstrap.sh (PERL_THREADS): Don't define.
(dosubst): Don't substitute it.
* lib/Automake/Config.in ($perl_threads): Define no more.
(@EXPORT): Drop it.
* aclocal.in ($perl_threads): Remove, no more needed.
* automake.in (BEGIN) [$perl_threads]: Don't require nor import
the 'threads' and 'Thread::Queue' modules.
(QUEUE_MESSAGE, QUEUE_CONF_FILE, QUEUE_LOCATION, QUEUE_STRING):
Delete constants.
($required_conf_file_queue): Delete variable.
($nthreads): Likewise, and thus ...
(get_number_of_threads): ... delete this function, whose only
purpose was to initialize that variable.
(handle_makefiles_serial): Delete, its body inlined in the main
code.
(require_file_internal): Don't take the '$QUEUE' argument, nor
handle threading/serialization calling back ...
(queue_required_file_check_or_copy): ... this function, which
has thus been removed.
(require_libsource_with_macro): Adjust 'require_file_internal'
call to new signature.
(require_conf_file): Likewise, in the process dropping any
handling of threading/serialization.
(handle_makefiles_threaded): This is no more called anywhere,
so delete it, together with ...
(require_queued_file_check_or_copy): ... this, which has in
that its only caller.
* lib/Automake/Location.pm (serialize, deserialize): Delete
as unused.
* lib/Automake/Channels.pm (setup_channel_queue,
pop_channel_queue): Likewise.
(@EXPORT): Adjust.
(BEGIN) [$perl_threads]: Don't require nor import 'threads'.
(%_default_options): Remove 'ordered', 'queue' and 'queue_key'
keys, that were only required for serialization during threaded
Automake.
(_merge_options, _print_message): No need to handle those
options.
Adjust creation of channels 'automake', 'verb' and 'fatal'.
(_enqueue, _dequeue): Delete as unused.
(msg): Adjust a comment.
(verb): Don't try to display informations about the current
thread.
* lib/Automake/DisjConditions.pm (CLONE): Delete, no more
needed.
* t/ax/am-test-lib.sh (require_tool): Drop handing of
requirement 'perl-threads'; it is not used by any test now.
* t/parallel-am.sh: Remove as obsolete.
* t/parallel-am2.sh: Likewise.
* t/parallel-am3.sh: Likewise.
* t/pm/Condition-t.pl: Likewise.
* t/pm/DisjConditions-t.pl: Likewise.
* Makefile.am (check-coverage-run, recheck-coverage-run): Don't
export 'WANT_NO_THREADS' to "yes", nor unset 'AUTOMAKE_JOBS'.
* master: (39 commits)
typofix: in a comment in Makefile.am
maintcheck: fixup list of files in $(xdefs)
tests: never source test-defs.sh directly, source test-lib.sh instead
runtest: sanitize test environment
tests: remove an obsolescent self test
tests: "am_using_tap=yes" -> "am_test_protocol=tap"
tests: protect test libs against multiple inclusion
configure: testsuite shell can return early from "dot-sourced" files
tests: move sanitization and "Bournification" in the generic test lib
tests: source test defs in the generic test lib
test defs: no need to re-add $srcdir/t/ax to $PATH
tests: split test libs into "generic" and "automake-specific"
test setup: move actual calling of testsuite setup in ./defs
test setup: merge definitions of function for simple tests
test init: refactor: new function 'am_test_setup'
test init: refactor: move displaying of debugging info later
test init: refactor: new function 'am_setup_testdir'
test init: refactor: new function 'am_set_exit_traps'
configure: testsuite shell set exit traps in shell functions
test init: refactor: new function 'am_exit_trap'
...
+ Extra non-trivial edits:
* Makefile.am (perf_TESTS): Define here, as 't/list-of-tests.mk' is gone
in the 'ng/master' branch.
(all_TESTS): Don't list tests in 't/perf'; this reflects the removal of
$(perf_TESTS) from $(handwritten_TESTS) done in 't/list-of-tests.mk' on
the 'master' branch.
* t/depcomp-shuffle.sh: Source 'test-lib.sh', not './defs-static'.
Also, simply use:
. depcomp-shuffle.sh
instead of:
. "$am_testauxdir"/depcomp-shuffle.sh
to source the helper shell script 'depcomp-shuffle.sh'. See recent
commit 'v1.12.2-49-g42fb45b' for a rationale.
* t/depcomp-shuffle-sub-vpath.sh: Likewise.
* t/depcomp-shuffle-sub.sh: Likewise.
* t/depcomp-shuffle-vpath.sh: Likewise.
* maint: (38 commits)
maintcheck: fixup list of files in $(xdefs)
tests: never source test-defs.sh directly, source test-lib.sh instead
runtest: sanitize test environment
tests: remove an obsolescent self test
tests: "am_using_tap=yes" -> "am_test_protocol=tap"
tests: protect test libs against multiple inclusion
configure: testsuite shell can return early from "dot-sourced" files
tests: move sanitization and "Bournification" in the generic test lib
tests: source test defs in the generic test lib
test defs: no need to re-add $srcdir/t/ax to $PATH
tests: split test libs into "generic" and "automake-specific"
test setup: move actual calling of testsuite setup in ./defs
test setup: merge definitions of function for simple tests
test init: refactor: new function 'am_test_setup'
test init: refactor: move displaying of debugging info later
test init: refactor: new function 'am_setup_testdir'
test init: refactor: new function 'am_set_exit_traps'
configure: testsuite shell set exit traps in shell functions
test init: refactor: new function 'am_exit_trap'
test init: refactor: new function 'process_requirements'
...
* testsuite-refactor: (33 commits)
maintcheck: fixup list of files in $(xdefs)
tests: never source test-defs.sh directly, source test-lib.sh instead
runtest: sanitize test environment
tests: remove an obsolescent self test
tests: "am_using_tap=yes" -> "am_test_protocol=tap"
tests: protect test libs against multiple inclusion
configure: testsuite shell can return early from "dot-sourced" files
tests: move sanitization and "Bournification" in the generic test lib
tests: source test defs in the generic test lib
test defs: no need to re-add $srcdir/t/ax to $PATH
tests: split test libs into "generic" and "automake-specific"
test setup: move actual calling of testsuite setup in ./defs
test setup: merge definitions of function for simple tests
test init: refactor: new function 'am_test_setup'
test init: refactor: move displaying of debugging info later
test init: refactor: new function 'am_setup_testdir'
test init: refactor: new function 'am_set_exit_traps'
configure: testsuite shell set exit traps in shell functions
test init: refactor: new function 'am_exit_trap'
test init: refactor: new function 'process_requirements'
...
tests: never source test-defs.sh directly, source test-lib.sh instead
After the recent re-organization, sourcing 'test-defs.sh' directly might
not work well and cause spurious failures or other unexpected behaviours.
We should source 'test-lib.sh' instead, which contains not more direct
code execution (only definition of shell variables/functions, or sourcing
of other '*.sh' with the same property), is protected against multiple
inclusions, and sources 'test-defs.sh' automatically in in a proper way.
* t/testsuite-summary-count.sh, t/tap-summary.sh, t/tap-summary-color.sh,
t/testsuite-summary-color.sh: Source 'test-lib.sh', not 'test-defs.sh'.
* gen-testsuite-part: Likewise, in the generated wrapper scripts.
* runtest.in: Here, similarly to what is done by AM_TESTS_ENVIRONMENT
in Makefile.am, unset variables that should be under the complete control
of the test framework, and that could create havoc if inherited from the
environment. This remove the need to check against possible environment
"pollution" ...
* t/ax/test-defs.in: ... in here.
* Makefile.am (AM_TESTS_ENVIRONMENT): Add a comment about the need of
synchronization with 'runtest.in'.
* t/self-check-env-sanitize.tap: Remove as obsolete.
* t/list-of-tests.mk: Adjust.
* t/self-check-tap.sh: This. The recent reorganization and code
moving between 'test-defs.sh' and 'test-lib.sh' has made it
brittle and prone to failures. Since the usefulness of this self
check is extremely limited, it's not worth trying to fix it. Just
remove it.
* t/list-of-tests.mk: Adjust.
And similarly, "am_using_tap=no" -> "am_test_protocol=none".
The new '$am_test_protocol' name is clearer, and will allow the easy
addition of further test protocols in the future. This is not truly
relevant for automake, but we are trying to make some parts of our
testsuite framework as general as possible, in view of a future move
to a more generic project like Gnulib.
* Makefile.am, t/ax/am-test-lib.sh, t/ax/test-defs.in, t/ax/test-lib.sh,
t/self-check-env-sanitize.tap, t/self-check-tap.sh: Adjust.
* syntax-checks.mk (sc_tests_obsolete_variables): Add 'am_using_tap' to
the list of obsolete variables to check against.
tests: protect test libs against multiple inclusion
* t/ax/test-lib.sh, t/ax/am-test-lib.sh: Return early if already sourced.
Use the witness variables '$test_lib_sourced' and '$am_test_lib_sourced',
respectively, for this purpose.
* runtest.in, Makefile.am (AM_TESTS_ENVIRONMENT): Unset 'test_lib_sourced'
and 'am_test_lib_sourced', to avoid interferences from the environment.
test defs: no need to re-add $srcdir/t/ax to $PATH
* t/ax/test-defs.sh: Here. That is already done by both 'runtest' and
AM_TESTS_ENVIRONMENT, and the presence of '$srcdir/t/ax' in $PATH is
anyway required, after the recent changes, for our testsuite framework
to work at all.
tests: split test libs into "generic" and "automake-specific"
This is the first step in the quest to merge the generically useful
parts of our test suite framework in a more generic project, like
Gnulib. Time will tell if we'll succeed, and whether the success will
be worth the extra hassle.
* t/ax/test-init.sh: Split out ...
* t/ax/am-test-lib.sh, t/ax/test-lib.sh: ... into these two tests.
* defs, Makefile.am: Adjust.
test setup: merge definitions of function for simple tests
* t/ax/plain-functions.sh: Delete, moving the definitions of ...
($stderr_fileno_): ... this variable ...
(warn_, fail_, skip_, skip_all_, fatal_, framework_failure_): ... and
these functions ...
* t/ax/test-init.sh: ... in here. This allow us to use those functions
earlier in this file (instead of having to duplicate their behaviour
with inlined code). The TAP-based tests are still able to override these
functions later to their TAP-enhanced equivalents when 'tap-functions.sh'
is sourced.
* Makefile.am (dist_noinst_DATA): Remove 't/ax/plain-functions.sh'.
* t/ax/tap-functions.sh: Adjust a comment.
* t/ax/test-init.sh (am_test_setup): Here.
Call it from the main code. Remove other calls of functions and
settings that are now duly called by 'am_test_setup'.
configure: testsuite shell set exit traps in shell functions
* configure.ac: Check that the shell selected to run the test
scripts can set an exit trap in a shell function, without having
that trap executed at the termination of the function rather
than of the scripts. According to the Autoconf manual, at least
AUX 5.3 /bin/sh suffers of such a bug.
test init: remove a couple of paranoid sanity checks
* t/ax/test-init.sh: Here, about 'am_top_srcdir' and 'am_top_builddir';
the values of those variables are AC_SUBST'd, so it's nigh impossible
for the to be wrong or get "messed up".
Now that the early $PATH setup in both 'runtest' and AM_TESTS_ENVIRONMENT
allow the '.' built-in to find to-be-sourced shell scripts in the 't/ax/'
directory automatically, we can simplify several usages like:
. "$am_testauxdir"/foo.sh
to just:
. foo.sh
Also, because our test scripts run with the 'errexit' flag active, and
because POSIX mandates that, when the '.' built-in is used,
... if no readable file is found, a non-interactive shell shall abort ...
We can do so with minimal churn, now that the early setup of $PATH in
both 'runtest' and AM_TESTS_ENVIRONMENT allow the '.' built-in to find
to-be-sourced shell scripts in 't/ax' automatically, both in in-tree
and VPATH builds.
With this change, we take another step forward a more rational and
"segregated" organization of our testsuite framework.
tests: update PATH early from AM_TESTS_ENVIRONMENT and runtest
Because the POSIX standards mandate that sourcing a file with ". FILE"
will cause FILE (assuming it is a relative containing no slashes) to be
looked for in PATH, such a move will allow us to simplify our sourcing
of shell testing libraries like (currently) 't/ax/test-init.sh' and
'defs', and to modularize and re-organize them better in the feature,
with minimal churn.
* runtest.in, Makefile.am (AM_TEST_ENVIRONMENT): Prepend $(abs_srcdir)/t/ax
and $(abs_builddir)/t/ax (in that order) to PATH; do so avoiding repetition
in the common case of non-VPATH builds.
runtest: export $srcdir for use by the test scripts
This is mostly a preparatory change in view of future ones. But it
also make the behaviour of runtest more similar to that of the test
harness used by "make check".
* runtest.in: Export srcdir (was already defined to '@srcdir@').
* gen-testsuite-part ($testauxdir): New, defined to "$testdir/ax".
Use it throughout, for better encapsulation and less duplication.
($auxdir): Remove as unneeded.
gen-tests: less hard-coding of 't' as the test directory
This will make life easier for us in case we decide to rename the
testsuite directory in the future (perhaps to something like 'tests',
which is somewhat less cryptic than the current 't').
* gen-testsuite-part ($testdir): New variable, used throughout instead
of hard-coding the name of the test directory to 't'.
All the script adjusted to make proper use of '$testdir'.
($auxdir): Move its definition earlier, for consistency with the one
of '$testdir'.
build: auxiliary testsuite files/scripts built by "make all"
This will allow the developers to run a tests case by hand out of
a newly extracted tarball simply doing:
$ ./configure && make
$ ./runtest t/the-test-case.sh
while before this change one has to resort to:
$ ./configure && make && make check TESTS=
$ ./runtest t/the-test-case.sh
or, with some non-GNU makes, even:
$ ./configure && make && make check TESTS= AM_MAKEFLAGS="TESTS="
$ ./runtest t/the-test-case.sh
This come very handy sometimes, especially when doing one-shot
debugging. Admittedly not a big deal, but one less friction in
the build system is always nice.
* Makefile.am (check_SCRIPTS, dist_check_DATA, nodist_check_DATA):
Move their content to ...
(noinst_SCRIPTS, dist_noinst_DATA, nodist_noinst_DATA): ... these
variables.
Adjust comments.
* t/list-of-tests.mk (handwritten_TESTS): Don't list ($perf_TESTS) in
here anymore.
* Makefile.am (EXTRA_DIST): Add them explicitly.
(perf): New target, run the performance tests and save the logs of
the ones with unexpected results in the file 't/perf/test-suite.log',
which is thus ...
(PERF_TEST_SUITE_LOG): ... defined in this variable ...
(CLEANFILES): ... and added to this.
(test_subdirs): Remove 't/perf': the tests in there are no more
listed in $(TESTS).
* t/ax/test-init.sh: Don't explicitly skip "perf" test here.
runtest: pass *all* the given shell options to the test invocation
* runtest.in: Here. This didn't work previously because, in our
option parsing loop, we were mistakenly redefining '$shell_opts'
each time, instead of appending to it.
* defs-static.in: Here: do not state anymore that this file should execute
correctly with any system's /bin/sh shell, as this is not true anymore: the
testsuite assumes a POSIX shell throughout these days.
runtest: support option --shell, tell which shell should run the test
* runtest.in: Here. The same effect could have been obtained by
exporting AM_TEST_RUNNER_SHELL to the desired value, but the new
API is simpler and requires less typing and less thinking.
tests: avoid spurious failure when running as root
Fixes automake bug#12041.
* t/primary-prefix-couples-force-valid.sh: If run as root, don't expect
a "test -x" on a non-executable files to fail: for root, all files are
executable (as well as readable and writable), and at least on Solaris
10 that causes "test -x" to succeed also on non-executable files.
[ng] tests: fix spurious failure in 'color-tests2.sh'
* t/color-tests2.sh: Change the idioms used to specify the value of
'AM_COLOR_TESTS' to make. This is required since, in contrast with
what happens in the mainline Automake counterpart, this script doesn't
invoke make with the '-e' option.
* master:
tests: avoid non-textual output in a '.log' file
tags: refactor to reduce code duplication (2)
tags: refactor to reduce code duplication (1)
tests: better name for a couple of tests
check: support colorized testsuite output by default
tags: unify recursion for tags targets with that of "usual" targets
+ Extra non-trivial edits:
* automake.in (handle_tests): Drop the '%COLOR%' transform in the
processing of both 'serial-tests.am' and 'parallel-tests.am', which
have superseded the 'check.am' from mainline Automake.
* lib/am/color-tests.am: Remove use of the '%?COLOR%' transform;
just act as if it were unconditionally TRUE.
(am__tty_colors_dummy): Merge into ...
(am__tty_colors): ... this.
* t/dist-formats.tap: Here. Otherwise, some inferior awk implementations,
like OpenIndiana /usr/xpg4/bin/awk, could be confused and cause spurious
errors in the testsuite harness.
* lib/am/tags.am (am__define_uniq_tagged_files): New variable,
factor out some code common to ...
(ctags-am, tags-am, ID): ... the recipes of these targets.
* lib/am/header-vars.am (am.chars.empty): This, move earlier. This both
fixes the associated comments (which referred to a variable defined above
it as "defined below"), and ensures that this variable is not used before
being defined (not a big deal in practice, since it expands to empty; but
better be consistent).
[ng] vars: names of iterating vars in $(foreach) loops shorter & simpler
In GNU make, after a "$(foreach x,...)" loop, the make variable $(x):
- is restored to its original variable it had before the 'foreach'
loop, if it was already set;
- re-unset otherwise.
This behaviour is checked by the recent spy test 't/spy-foreach.sh'.
This means that, in most situations, there's no actual need to use
a "namespace safe" variable name for the iterating variable in a
"$(foreach ...)" loop, because that variable won't linger in the
environment after the loop anyway.
* lib/am/compile.am, lib/am/header-vars.am, lib/am/parallel-tests.am,
lib/am/serial-tests.am: Adjust to use simpler variables names in their
foreach loops; for example, simply 'v' instead of 'am__v', etc.
[ng] spy: iteration variables in "$(foreach ...)" loops are temporary
* t/spy-foreach.sh: New test. Check that, after a "$(foreach x,...)"
loop, the make variable $(x) is:
- restored to the original variable it had before the 'foreach'
loop, if it was already set; and
- is re-unset otherwise.
The test 't/memoize.sh' was producing a '.log' file with few overly-long
lines (more than 12k characters long) and, when Solaris XPG4 awk was in
use, that was causing the 'test-driver.sh' script to experience a spurious
failure:
/usr/xpg4/bin/awk: line 382 (B): Record too long (LIMIT: 19999 bytes)
tap-driver.sh: fatal: I/O or internal error
* t/memoize.sh: Temporary disable shell tracing and make output in a few
places, to prevent the resulting '.log' file to contain overly long lines.
* master:
tests: avoid a spurious failure with Solaris /bin/sh
tests: fix buglet in t/missing3.sh
self tests: avoid spurious failures on older bash
tests: remove t/parallel-tests-many.sh (fixes spurious failure)
typofix: in a comment in the automake script
news: minor fixlets and reordering
+ Extra non-trivial edits:
* t/parallel-tests-many.sh: Do not deleted; keep the correct and
improved version from the 'ng/master' branch.
* t/subpkg.sh: Here: do not expect the C compiler to be simply
named 'cc'. This was causing spurious failures when $CC was
overridden at configure time or though config.site.
* ng/many-tests:
[ng] check: in recipes, don't use pipe when redirection suffices
[ng] recheck: don't exceed command line limits, even with many failed tests
[ng] coverage: recheck with many failed tests
[ng] check: refactor for less duplication and better performances
[ng] check: use awk rather than grep+xargs to count test results
[ng] parallel-tests: do not exceed command line length limits
[ng] coverage: testing with lots of test scripts
tests: avoid a spurious failure with Solaris /bin/sh
The /bin/sh shell on Solaris is dumb enough not to set the exit
status to 127 after the execution of a non-existing command is
attempted:
$ /bin/sh -c 'nonesuch'; echo stat = $?
/bin/sh: nonesuch: not found
stat = 1
This means that the missing script, when run through that shell,
cannot discriminate between a real failure of a maintainer tool
and a failure due to its absence. This is not a big deal in
practice (especially because all the 'missing' invocations in
our Makefiles are done with $(SHELL), and that is almost surely
set by configure to a proper POSIX shell), but was causing an
annoying failure in our testsuite. Fix it.
* t/missing3.sh: If 'missing' is run with a /bin/sh shell suffering
from the just-described bug, skip the check that would spuriously
fail due to that bug.
* t/missing3.sh: Be sure to use 'run_cmd' also in the first invocation
of 'missing', to ensure the stderr will actually be saved in a file we
can later grep.
* maint:
self tests: avoid spurious failures on older bash
tests: remove t/parallel-tests-many.sh (fixes spurious failure)
typofix: in a comment in the automake script
news: minor fixlets and reordering
* t/self-check-explicit-skips.sh: Remove or rework few checks for use
cases that are no more relevant nor supported now that we've got rid
of the need to use the 'Exit' function explicitly. Make the other
existing checks stricter.
That test was checking for automake#7868 "parallel-tests and command-line
length limit issue". That bug is still open, and the tests was xfailing.
What concerns us is that the test was also causing an annoying problem.
On Solaris 10, it produced a '.log' file with two overly-long lines (more
than 1 million characters long!) and that was causing the test harness to
experience spurious failures, with Solaris XPG4 awk complaining that:
/usr/xpg4/bin/awk: line 0 (NR=734): Record too long (LIMIT: 19999 bytes)
A little consideration shows that the bug#7868 checked by the culprit
test cannot be solved "by accident", e.g., by another bug fix or some
simple refactoring, so there is little added value in keeping the xfailing
test for it, if this causes other problems (and we've seen it does).
So we just remove the test. In case we ever manage to fix the bug in
mainline automake, we can copy over the similar test(s) from Automake-NG,
which has actually managed to fix the bug (and have simpler test cases
for it).
* t/parallel-tests-many.sh: Delete.
* t/list-of-tests.mk (XFAIL_TESTS, handwritten_TESTS): Remove it.
check: support colorized testsuite output by default
Fixes automake bug#11855.
With this change, we make the 'color-tests' option enabled by default.
That option remains still silently accepted as a no-op, for backward
compatibility.
The developer of a package is still free to disable testsuite coloring on
a per-makefile basis (by adding "AM_COLOR_TESTS = no" to the Makefile.am)
or on a whole-project basis (by AC_SUBST'ing AM_COLOR_TESTS to "no" in
configure.ac). But now the user will be able to request the testsuite
output to be colorized, if he really wants to:
# With GNU make:
make AM_COLOR_TESTS=yes check
# With non-GNU make:
make AM_COLOR_TESTS=yes AM_MAKEFLAGS=AM_COLOR_TESTS=yes check
* NEWS: Update.
* doc/automake.texi: Updated, and some related minor reformatting
and rewording.
* automake.in (handle_tests): No need to pass the transform '%COLOR%'
when processing "check.am".
* lib/am/parallel-tests.am: Remove use of the '%?COLOR%' transform;
just act as if it were unconditionally TRUE.
* t/color.sh: No need to specify 'color-tests' in 'AUTOMAKE_OPTIONS'
nor in 'AM_INIT_AUTOMAKE'.
* t/ax/testsuite-summary-checks.sh: Likewise.
* t/ax/tap-summary-aux.sh: Likewise.
* t/color2.sh: Likewise. Also, ensure that colorized testsuite output
can be disabled by default by calling "AC_SUBST([AM_COLOR_TESTS], [no])".
* t/tap-realtime.sh: Define 'AM_COLOR_TESTS' to "no" in Makefile.am, to
avoid spurious colorization of the output due to the use of the 'expect'
program.
* t/color-tests-opt.sh: New test, check that the 'color-tests' option is
still recognized as a no-op.
* t/list-of-tests.mk: Add the new test.
* lib/am/clean.am: In here, about the need to break too long lists
of files to be cleaned in order to avoid exceeding command line
limits. We already do that successfully!
* t/spy-pattern-rules.sh : Fix heading comments to be more faithful
about what the test really checks. Add more tests checking that, in
case of overlapping pattern rules, the one "more specific", i.e.,
with the shortest target stem, wins.
[ng] check: in recipes, don't use pipe when redirection suffices
Instead of the botched idiom:
while read c; do echo $c; done <file | command
use the simpler and much better one:
command <file
Not only the latter is simpler and marginally more efficient, but is also
better at catching possible unexpected I/O errors; while in the former,
the exit status of the while loop (which might have revealed such errors)
was lost in the pipeline.
* lib/am/parallel-tests.am ($(TEST_SUITE_LOG), recheck): Use the better
idiom.
[ng] recheck: don't exceed command line limits, even with many failed tests
Related to automake bug#7868.
* lib/am/parallel-tests.sh (recheck): Arrange recursive make invocation
to pass the list of tests to be rechecked in the make standard input
rather than on the make command line.
(am__test_bases): Only define if not already set, to make the new idiom
referenced above work as expected.
* Makefile.am (XFAIL_TESTS): Remove 't/parallel-tests-many.sh' once
again.
* t/parallel-tests-many.sh: Extend to check that the 'recheck' target
works even when a huge number of tests (~ 30k) have failed in the
previous testsuite run. Currently this doesn't work, and causes the
test to fail, so list it ...
* Makefile.am (XFAIL_TESTS): ... in here.
tags: unify recursion for tags targets with that of "usual" targets
This change has a side effect: now any failure of the 'tags', 'ctags',
'cscope' and 'cscopelist' targets in a subdirectory will cause the
recursive command issued from the top directory to fail. We believe
that this behavioural change is not only justified by the simplification
this patch entails, but actually offers better semantics: ignoring
failures by default is never a good idea, and with make, the user can
anyway order the completion of commands in the face of possible failures
with the '-k' option.
* NEWS: Update.
* automake.in (%required_targets): Add keys 'cscopelist-am', 'tags-am'
and 'ctags-am'.
(handle_tags): Greatly simplified, the major part of the handling of
recursion for the 'tags', 'ctags' and 'cscopelist' now moved out to ...
* lib/am/tags.am: ... this file, that has been adjusted and extended
accordingly.
* t/maken3.sh: Remove testing of the 'TAGS' target, that is now just
an alias to 'tags'. Without this change, this test would spuriously
fail.
[ng] check: refactor for less duplication and better performances
* lib/am/parallel-tests.am (am__count_test_results): Adjust this awk
program to emit a shell snippet to be executed by the calling recipe ...
($(TEST_SUITE_LOG)): ... here. This avoid the need to call the program
in $(am__count_test_results) once for each valid test result.
[ng] parallel-tests: do not exceed command line length limits
Fixes automake bug#7868.
Two things worth noting:
+ a "make recheck" issued after a huge number of tests have failed
can still hit command-line length issues;
+ the check-recipes now contain (first among the Automake-generated
recipes) a use of the 'xargs' utility.
These issues will likely be tackled by later patches.
* Makefile.am (XFAIL_TESTS): Remove 't/parallel-tests-many.sh'.
* lib/am/clean.am (.am.clean-cmd.f, .am.clean-cmd.d, .am.rm-f,
.am.rm-rf): Move their definitions ...
* lib/am/header-vars.am: ... here, because we need to use them ...
* lib/am/parallel-tests.am: ... here as well.
(am.test-harness.workdir, am.setup-test-harness-workdir,
am.test-harness.append-to-list-of-bases): New internal variables.
Use them to avoid hitting command-line length limits ...
($(TEST_SUITE_LOG), recheck): ... in this rules ...
(am__remove_if_not_lazy_check): ... and in the shell code defined
by this internal variable.
* t/parallel-tests-many.sh: Simplify and enhance. Among other things,
this test now tries running ~ 30k tests. Currently fails on several
systems (e.g., Linux 2.6.30 on i686, Solaris 10 on i86pc).
[ng] automake: new function &almost_verbatim (small refactoring)
* automake.in (almost_verbatim): New function, thin wrapper around
'&preprocess_file'. It requires just the name of the fragment to
preprocess (assuming it is one provided by automake, and thus taking
care to prepend the "$libdir/am/" path and append the ".am" extension
automatically), and then automatically append the processed content
to the '$output_verbatim' global variable.
(handle_all_and_check, handle_install, handle_texinfo): Adjust to use
'&almost_verbatim' instead of '&preprocess_file'.