* 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
* 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.
[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'.
* automake.in (generate_makefile): In here, about the generated
Makefile baling out if '$(am__seen_error)' has been set by some
previous function call.
* t/longline.sh: Use "$i", not bare "i", to reference the value of
the shell variable 'i' in a $((...)) expression. Issue revealed by
a failure with dash 0.5.2.
* t/dist-many2.sh: We don't fake the command line length for the shell
at "max 2000 chars", but at at "max 4000 chars". Adjust heading comment
accordingly.
[ng] vars: names for internal make variables: 'am.foo' and 'am.foo.bar-baz'
That is the new preferred naming scheme: 'am.foo' where we would
have previously used something like 'am__foo', and 'am.foo.bar-baz'
where we would have previously used something like 'am__foo_bar_baz'
or 'am__foo__bar_baz'.
We should start using the new naming to do so in future commits. But
we should also avid a sweeping rename for now, to minimize conflicts
with the mainline Automake codebases, which (for portability reason)
must still limit itself to the use of the 'am__' prefix.
* HACKING: Adjust. Also, remove now-irrelevant advice about the
problem of an old vendor make (NEWS-OS 4.2R) with variables whose
name start with an underscore.
* ng/dist-many:
[ng] dist: do not exceed command line length limits, even with many files
[ng] coverage: distributing lots of files
[ng] dist: memoize some internal variables
* master: (23 commits)
fixup: delete "# serial" line in m4/amversion.in
news: update about recent ylwrap changes and fixes
m4: get rid of "# serial" lines
configure: ${#param} must be supported by the shell for the testsuite
yacc tests: fix a spurious failure with parallel make
ylwrap: use proper quoting inside a `...` substitution
ylwrap: don't uselessly reset the exit status in case of failure
ylwrap: fix C++ support for Bison
ylwrap: refactor: move loop invariant
ylwrap: refactoring: don't rely on the file order
tests: upgrade and fix Bison test case
tests: fix bison input file
ylwrap: comment changes
ylwrap: modernize idioms
ylwrap: rename header inclusion in generated parsers
ylwrap: simplify the list of renamings
ylwrap: refactor: less duplication
news: mention fixed testsuite weaknesses
news: bump, for future 1.12.3
tests: verify the shell test scripts are syntactically valid
tests: don't use C instead of C++ compiler on case-insensitive platforms
tests: avoid spurious TAP errors on Mac OS X 10.7
tests: fix spurious failure in aclocal7.sh on fast machines
* maint:
fixup: delete "# serial" line in m4/amversion.in
news: update about recent ylwrap changes and fixes
m4: get rid of "# serial" lines
configure: ${#param} must be supported by the shell for the testsuite
yacc tests: fix a spurious failure with parallel make
ylwrap: use proper quoting inside a `...` substitution
ylwrap: don't uselessly reset the exit status in case of failure
ylwrap: fix C++ support for Bison
ylwrap: refactor: move loop invariant
ylwrap: refactoring: don't rely on the file order
tests: upgrade and fix Bison test case
tests: fix bison input file
ylwrap: comment changes
ylwrap: modernize idioms
ylwrap: rename header inclusion in generated parsers
ylwrap: simplify the list of renamings
ylwrap: refactor: less duplication
* yacc-work:
news: update about recent ylwrap changes and fixes
yacc tests: fix a spurious failure with parallel make
ylwrap: use proper quoting inside a `...` substitution
ylwrap: don't uselessly reset the exit status in case of failure
ylwrap: fix C++ support for Bison
ylwrap: refactor: move loop invariant
ylwrap: refactoring: don't rely on the file order
tests: upgrade and fix Bison test case
tests: fix bison input file
ylwrap: comment changes
ylwrap: modernize idioms
ylwrap: rename header inclusion in generated parsers
ylwrap: simplify the list of renamings
ylwrap: refactor: less duplication
The "#serial" lines are only considered by aclocal for the system-wide
third-party '.m4' files, not for the Automake-provided ones. So they
serve no real purpose in the Automake '.m4' files.
In addition, now that we use git and topic branches, and that we are also
writing the Automake-NG fork, the "#serial" lines are becoming more and
more unreliable (e.g., different version of the same file in different
branches can easily end up having the same serial numbers).
So let's just nuke all the "#serial" lines. See also automake bug#11932.
ylwrap: don't uselessly reset the exit status in case of failure
* lib/ylwrap: Here. In case of a failure in the wrapped yacc/lex
invocation, '$ret' (holding the final exit status of ylwrap) was
being uselessly reset to '1' in the later if/else.
The current logic of ylwrap is to call yacc in a sub directory, and
pull out of it all the files that were requested on its command line.
Reverse this approach: export *all* the files created in the
subdirectory, but rename them according to what the command says.
This way, extra files, such as position.hh, location.hh and stack.hh
for C++ parsers, but also parser.xml or parser.dot if XML or Dot
output is enabled, will be preserved.
* lib/ylwrap (pairlist): Remove.
(main loop): Don't loop over pairlist, but over the files in the
temporary directory.
* t/list-of-tests.mk (XFAIL_TESTS): Fixes t/yacc-bison-skeleton-cxx.sh.
* THANKS (James Bostock): Add, he reported bug#7648.
* t/yacc-bison-skeleton-cxx.sh: Request locations, to be
even more stressful.
Use %union to make sure the %{...%} is inserted where appropriate.
Fix some indentation/coding style issues.
Do not provide implementations in the %{...%} section, especially if the
header is included elsewhere, since then the linker will complain about
multiple definitions.
Reported by Stefano Lattarini,
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00126.html>.
* t/yacc-bison-skeleton.sh (zardoz.y): Define yylex and yyerror in the
epilogue.
ylwrap: rename header inclusion in generated parsers
Some types of Bison parsers, such as the GLR ones, generate a header
file that they include. ylwrap, which renames the generated files,
does not rename the included file. Fix this shortcoming, reported
for instance here:
<http://lists.gnu.org/archive/html/bug-bison/2012-06/msg00033.html>.
Fixes t/yacc-bison-skeleton.sh, see Automake bug#7648 and PR automake/491.
* lib/ylwrap (quote_for_sed): Accept arguments.
Catch more special characters.
(rename_sed): New.
Improve the previous renaming sed commands using quote_for_sed.
Suggested by Stefano Lattarini here:
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00095.html>.
(main loop): Use rename_sed to rename the dependencies to other files.
* t/yacc-d-basic.sh: Exercise this case, even if bison/yacc was
not issuing such an include.
* t/list-of-tests.mk (XFAIL_TESTS): Adjust.
* lib/ylwrap (pairwise): Instead of being a straightforward copy from
the command line arguments, and having to deal with y.tab vs. y_tab
later, let pairwise store the real file names to process, y_tab
conversion included when needed.
(main loop): Use $to instead of $2, for symmetry with $from.
* maint:
news: mention fixed testsuite weaknesses
news: bump, for future 1.12.3
tests: verify the shell test scripts are syntactically valid
tests: don't use C instead of C++ compiler on case-insensitive platforms
tests: avoid spurious TAP errors on Mac OS X 10.7
tests: fix spurious failure in aclocal7.sh on fast machines
tests: verify the shell test scripts are syntactically valid
Fixes automake bug#11898.
This measure of extra safety is mostly motivated by the fact that some
shells (at least some versions of Bash in the 3.x release series, one
of which serves as /bin/sh on Mac OS X 10.7, as well as Bash 4.0 and the
/usr/xpg4/bin/sh shell from Solaris 10) erroneously exit with exit status
0 upon encountering a syntax error, if an exit trap is sett (as it is in
our test scripts).
* Makefile.am (check-tests-syntax): New, check that the shell test
scripts listed in $(TESTS) are syntactically correct.
(.PHONY, check-local): Depend on it.
* t/self-check-exit.tap : Remove checks verifying that a script exits
with non-zero status upon encountering a syntax error; as explained
above, we can't depend on that.
[ng] dist: do not exceed command line length limits, even with many files
* lib/am/distdir.am (am.mkdir-for-dist, am.write-list-of-distfiles): New
internal functions.
(distdir): Using them and the 'am.xargs-map' function, in a way that
should prevent failures due to excessive command line lengths.
With this, the tests 'dist-many.sh' and 'dist-many2.sh' pass on the
systems where we verified they were previously failing.
* t/dist-many.sh: New test, try distributing ~ 30 thousands files.
Currently fails on several systems (e.g., Linux 2.6.30 on i686,
Solaris 10 on i86pc).
* t/dist-many2.sh: New test, check that our distribution rules do not
hit errors due to an exceeded command line length when there are
many files to distribute; it does so by faking a very low command
line length limit for 'mkdir' (max 50 arguments) and the shell (max
4000 characters). Currently failing.
tests: don't use C instead of C++ compiler on case-insensitive platforms
This change fixes automake bug#11893 and bug#10766.
On at least Cygwin and Mac OS X 10.7, the file system where the system
compilers are located can be case-insensitive, so that looking for a
program named 'CC' might actually find the C compiler in /usr/bin/cc.
Now, the Automake configure script looks for a C++ compiler named 'CC'
before looking for more obvious names like c++ or g++ (that is done to
increase testsuite "coverage in the wild", e.g., preferring, on Solaris,
the Sun Studio C++ compiler /usr/bin/CC over the GNU C++ compiler).
Since the checks done in AC_PROG_CXX are apparently not strict enough
to rule out C compilers like those from GCC or Clang (which are smart
enough to recognize if a file has a C++ extension, passing it to the
C++ front end) the testsuite might end up using a C compiler where a
C++ one is expected, with some subtle bad consequences.
* configure.ac: Don't look for a C++ compiler named 'CC' if the
"top-level" file system(s) (where /bin and /usr/bin are) are detected
to be case-insensitive.
Reported-by: Peter Rosin <peda@lysator.liu.se> Reported-by: Max Horn <max@quendi.de> Helped-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* t/suffix8.tap: The libtool bug#11895 was causing the ./configure script
to output a stray "ok" string on a line of its own, confusing the TAP
driver into thinking this was an extra test result (which resulted in the
next, real test results being flagged as "OUT-OF-ORDER"). Fix this by
protecting configure output.
* t/suffix10.tap: Likewise, and for the "make distcheck" output as well.
* THANKS: Update.
* t/aclocal7.sh: Since aclocal rewrites aclocal.m4 unless the input files
are all older than the existing aclocal.m4, so we must sleep to ensure
somedefs.m4 has an older timestamp than the aclocal.m4 the next aclocal
call will generate.
Merge branch 'master' into ng/master (with fix for CVE-2012-3386)
This makes the fix for a locally-exploitable security vulnerability
(CVE-2012-3386) available to the Automake master branch.
* master:
sync: update files from upstream with "make fetch"
news: improve wording in entry about CVE-2012-3386
maint: post-release minor version bump
release: stable release 1.12.2
distcheck: never make part of $(distdir) world-writable
compat: automake should substitute @mkdir_p@, for backward compatibility
fixup: t/README: it's ./runtest, not ./t/ax/runtest
This makes the fix for a locally-exploitable security vulnerability
(CVE-2012-3386) available to the Automake master branch.
* maint:
sync: update files from upstream with "make fetch"
news: improve wording in entry about CVE-2012-3386
maint: post-release minor version bump
release: stable release 1.12.2
distcheck: never make part of $(distdir) world-writable
compat: automake should substitute @mkdir_p@, for backward compatibility
fixup: t/README: it's ./runtest, not ./t/ax/runtest