[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-4
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-459-gf2ed281 |
Date: |
Tue, 28 Jun 2011 12:40:56 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=f2ed2817e85bb9e174889171cbc8d2bcb2694f59
The branch, yacc-work has been updated
via f2ed2817e85bb9e174889171cbc8d2bcb2694f59 (commit)
via 1d76d3f56efbaf6152ce5a6795fd0b2a3d0d92dd (commit)
via 73c31733ff88493f751938451600d6950f9fb0b7 (commit)
via c9e39919f0afea01e55795050d4978f530e086e2 (commit)
via 404882ab2ac0a9447f6eccb2fa218df70582f488 (commit)
via 9667c39a2cd9c1af4be172169031975febe78657 (commit)
via 5755b7bcbd3892eb6aa31542fc7e2435a0de11ab (commit)
via c1040a74c10a9a011a04ad0d347b61465c5ee194 (commit)
via 9478566087f83d1fac2c9a7629898a3d39a05fdd (commit)
via 72d36af268fa7bee24466e21d2d543d8d1ce7b1c (commit)
via 1c3614c6d47b4428c39a784dda7f2641cfc8f6d6 (commit)
via 42a9c4db8dc4624dc2b59d1f9a3efb45e359c12e (commit)
via 9b61494445c234e505a2efea8e1c0384591edd2f (commit)
via b8c2b69913b652bcfd4665b041f11d8b5316da2b (commit)
via 60cd9bc070d62bb9046298792bf344d233620a14 (commit)
via 98fab1246b31bc4eb5d83ac7524d1fd126d0e416 (commit)
via f541f9a4c8a5016ed4d77e54f4a3d707a863feaa (commit)
via d30f97d1b62026c962240887d76355f89175b755 (commit)
via 474aad06941498f4c4363b6023eb2f0045b73397 (commit)
via e8bcc4800b17c3fd64b951e0136e7769693edbc8 (commit)
via 4e9474e6e9b18723d3fb02858824682dbd0e03f0 (commit)
via e4a70cff310e29066e388aa18aeb07242e003eec (commit)
via f31a38aed9c8ffbd33d797aa2df5b5864860bb17 (commit)
via 5c237a6208c74eb445613e5237b4749d62f18b28 (commit)
via a9eef973b5ea47cc3495f1a8307d4f7b85aea46f (commit)
via 42a465249b6d3425efbf23df8f2b62fc0e088cfb (commit)
from e79aed067f344f7431346ef6d97859abd30e18f4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 180 ++++++++++++++++++++++++
Makefile.am | 34 ++++-
Makefile.in | 31 ++++-
NEWS | 5 +
THANKS | 1 +
automake.in | 95 +++++++------
doc/automake.texi | 129 +++++++++++------
lib/Automake/Options.pm | 4 +
lib/Automake/tests/Makefile.in | 31 +++--
lib/am/check.am | 46 ++++---
m4/protos.m4 | 2 +
tests/Makefile.am | 6 +
tests/Makefile.in | 37 +++--
tests/ansi.test | 4 +-
tests/ansi10.test | 4 +-
tests/ansi2.test | 2 +-
tests/ansi2knr-deprecation.test | 69 +++++++++
tests/ansi3.test | 4 +-
tests/ansi3b.test | 4 +-
tests/ansi4.test | 2 +-
tests/ansi5.test | 4 +-
tests/ansi6.test | 4 +-
tests/ansi7.test | 4 +-
tests/ansi8.test | 2 +-
tests/ansi9.test | 4 +-
tests/autodist-no-duplicate.test | 52 +++++++
tests/autodist-subdir.test | 27 +----
tests/autodist.test | 31 +----
tests/cxxansi.test | 2 +-
tests/lex-clean-cxx.test | 4 +
tests/lex-depend-cxx.test | 4 +
tests/libobj8.test | 2 +-
tests/parallel-tests-harderror.test | 98 +++++++++++++
tests/parallel-tests-log-override-1.test | 112 +++++++++++++++
tests/parallel-tests-log-override-2.test | 88 ++++++++++++
tests/parallel-tests-log-override-recheck.test | 92 ++++++++++++
tests/parallel-tests.test | 18 +--
tests/yacc-cxx.test | 6 +-
38 files changed, 1006 insertions(+), 238 deletions(-)
create mode 100755 tests/ansi2knr-deprecation.test
create mode 100755 tests/autodist-no-duplicate.test
create mode 100755 tests/parallel-tests-harderror.test
create mode 100755 tests/parallel-tests-log-override-1.test
create mode 100755 tests/parallel-tests-log-override-2.test
create mode 100755 tests/parallel-tests-log-override-recheck.test
diff --git a/ChangeLog b/ChangeLog
index 785e815..1d1ceac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,163 @@
+2011-06-28 Stefano Lattarini <address@hidden>
+
+ yacc tests: fix bug in 'yacc-cxx.test'
+ * tests/yacc-cxx.test: Enable `errexit' shell flag (the lack of
+ which was masking the bug).
+ (bar.cxx): Rename to ...
+ (bar2.cxx): ... this, otherwise automake will (correctly) complain
+ that object `bar.o' is created by both `bar.cxx' and `bar.c++'.
+ (Makefile.am): Adjust.
+
+2011-06-28 Stefano Lattarini <address@hidden>
+
+ lex tests: fix spurious link errors on Solaris
+ On Solaris 10, linking of lex-generated programs was failing in a
+ couple of lex tests with errors like this:
+ g++ -g -O2 -o joe joe.o -ll
+ Undefined symbol first referenced in file
+ yywrap() joe.o
+ ld: fatal: Symbol referencing errors. No output written to joe
+ collect2: ld returned 1 exit status
+ This change fixes it, also fixing at once potential problems for
+ systems that don't have a "lex library" (this happens for example
+ when cross-compiling from GNU/Linux to MinGW).
+ * tests/lex-depend-cxx.test (joe.ll, moe.l++): Define a dummy
+ `yywrap()' function.
+ * tests/lex-clean-cxx.test (mainfoo.cc, mainbar.cpp, mainbaz.c++,
+ mainqux.cxx): Likewise.
+
+2011-06-23 Stefano Lattarini <address@hidden>
+
+ docs: avoid a footnote, some related rewordings and improvements
+ * doc/automake.texi (Dist): Reword the part about automatically
+ distributed files to avoid a footnote. Since we are at it, extend
+ a bit, and add an example and a reference to a relevant test case.
+
+2011-06-23 Stefano Lattarini <address@hidden>
+
+ docs: minor cosmetic fixes
+ * doc/automake.texi: Break few overly long lines, throughout the
+ file.
+ ("Simple Tests"): Move @vindex for XFAIL_TESTS to the correct
+ position, i.e., before and not after the paragraph where it is
+ introduced.
+ ("Options" @item ansi2knr): Use @pxref instead of @xref. This
+ fixes a texinfo warning.
+ ("Other things Automake recognizes" @item AM_C_PROTOTYPES): Use
+ @pxref instead of @ref.
+
+2011-06-23 Stefano Lattarini <address@hidden>
+
+ help: improve text about automatically-distributed files
+ This change fixes automake bug#7819.
+ * automake.in (usage): Distinguish between files that are always
+ automatically distributed when found, and those which are only
+ "under certain conditions".
+ * doc/automake.texi (Basics of Distribution): Update accordingly.
+ * tests/autodist-subdir.test: Update.
+ * tests/autodist-no-duplicate.test: Likewise.
+ * tests/autodist.test: Likewise.
+ (configure.in): Remove useless call to AM_MAINTAINER_MODE.
+
+2011-06-23 Stefano Lattarini <address@hidden>
+
+ refactor: split 'usage' subroutine in automake
+ This change is related to automake bug#7819.
+ * automake.in (print_autodist_files): New subroutine,
+ extracted from ...
+ (usage): ... this, which now uses it.
+ * tests/autodist-no-duplicate.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+2011-06-23 Stefano Lattarini <address@hidden>
+
+ tests: fix bug in 'autodist.test'
+ * tests/autodist.test: Avoid spurious failure due to no
+ `defs-static' file being found in the parent directory.
+
+2011-06-21 Stefano Lattarini <address@hidden>
+
+ maintcheck: extend 'sc_tests_plain_*' checks
+ * Makefile.am (sc_tests_plain_autom4te): New check.
+ (sc_tests_plain_autoreconf): Likewise.
+ (sc_tests_plain_autoheader): Likewise.
+ (syntax_check_rules): Update.
+
+2011-06-20 Stefano Lattarini <address@hidden>
+
+ maintcheck: avoid few spurious failures
+ * Makefile.am (sc_tests_plain_aclocal, sc_tests_plain_perl,
+ sc_tests_plain_autoconf, sc_tests_plain_automake,
+ sc_tests_plain_autoupate): Be stricter in matching an erroneous
+ literal command, i.e., `aclocal', `automake', `perl', etc.
+
+2011-06-20 Bert Wesarg <address@hidden> (tiny change)
+
+ check: don't use multi-line coloring for the report
+ "less -R" can't handle multi-line coloring as it is done for the
+ check reports of the serial and parallel testsuite, because of
+ performance reasons. Thus, color each line of the check report
+ by its own.
+ * lib/am/check.am (am__text_box): Accept colors for lines, and
+ color each line by its own.
+ [%?PARALLEL_TESTS%] $(TEST_SUITE_LOG): Let am__text_box handle
+ the line coloring.
+ [!%?PARALLEL_TESTS%] $(check-TESTS): Color each report line by
+ its own.
+ * THANKS: Update.
+
+2011-06-18 Stefano Lattarini <address@hidden>
+
+ docs: AM_DISTCHECK_CONFIGURE_FLAGS is for corner cases
+ * doc/automake.texi (Checking the Distribution): Explain that the
+ developers should take care of making their code buildable without
+ requiring any special configure options, so that in general
+ AM_DISTCHECK_CONFIGURE_FLAGS shouldn't be used. Give an example
+ of where its use is legitimate.
+ Suggestions from Ralf Wildenhues and Eric Blake.
+
+2011-06-14 Stefano Lattarini <address@hidden>
+
+ ansi2knr: deprecate, it will go away in the next major release
+ * doc/automake.texi: Loudly and repeatedly state that the old
+ de-ANSI-fication features are now deprecated and will be removed
+ in the next major Automake release. Other related adjustments.
+ * lib/Automake/Options.pm (_process_option_list ): Give a warning
+ in the `obsolete' category when the `ansi2knr' option is used.
+ * m4/protos.m4 (AM_C_PROTOTYPES): Deprecate this macro: a warning
+ in the `obsolete' category will be emitted it if is used.
+ * tests/ansi2knr-deprecation.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+ * tests/ansi.test: Adjust, by calling autoconf and/or automake
+ with the `-Wno-obsolete' flag.
+ * tests/ansi10.test: Likewise.
+ * tests/ansi2.test: Likewise.
+ * tests/ansi3.test: Likewise.
+ * tests/ansi3b.test: Likewise.
+ * tests/ansi4.test: Likewise.
+ * tests/ansi5.test: Likewise.
+ * tests/ansi6.test: Likewise.
+ * tests/ansi7.test: Likewise.
+ * tests/ansi8.test: Likewise.
+ * tests/ansi9.test: Likewise.
+ * tests/cxxansi.test: Likewise.
+ * tests/libobj8.test: Likewise.
+ * NEWS: Update about the future planned backward-incompatibility
+ due to the removal of de-ANSI-fication feature.
+
+2011-06-19 Stefano Lattarini <address@hidden>
+
+ docs: primary/prefix combination "pkglib_PROGRAMS" is now invalid
+ * doc/automake.texi (Program Sources): pkglib_PROGRAMS is not a
+ valid combination anymore, so don't document it. Inconsistency
+ introduced in commit `v1.11-373-g9ca6326'.
+
+2011-06-19 Jim Meyering <address@hidden>
+
+ docs: replace obsolete @vindex entry with a useful one
+ * doc/automake.texi (Program Sources): Do not index obsolete
+ pkglib_PROGRAMS here. Do index pkglibexec_PROGRAMS.
+
2011-06-13 Stefano Lattarini <address@hidden>
tests: optimize tests on primary/prefix mismatch for speed
@@ -188,6 +348,15 @@
the `DESTDIR' variable, is poorly chosen, if not downright wrong.
Rewrite it to use `prefix' as the overridden variable instead.
+2011-05-22 Stefano Lattarini <address@hidden>
+
+ parallel-tests: stricter checks on DISABLE_HARD_ERRORS support
+ * tests/parallel-tests-harderror.test: New test, doing more
+ in-depth checks on DISABLE_HARD_ERRORS.
+ * tests/parallel-tests.test: Remove tests on DISABLE_HARD_ERRORS,
+ now redundant.
+ * tests/Makefile.am (TESTS): Update.
+
2011-05-20 Stefano Lattarini <address@hidden>
testsuite: avoid re-running few tests with 'parallel-tests' option
@@ -245,6 +414,17 @@
when cross compiling.
(gfortran, g77, non-cross): New requirements.
+2011-05-11 Stefano Lattarini <address@hidden>
+
+ check: document and test $(TEST_SUITE_LOG) overriding
+ * doc/automake.texi (Simple Tests using parallel-tests): Explain
+ how and why TEST_SUITE_LOG can be overridden at runtime.
+ * tests/parallel-tests-log-override-1.test: New test, check that
+ the newly documented idiom and similar usages are truly supported.
+ * tests/parallel-tests-log-override-2.test: Likewise.
+ * tests/parallel-tests-log-override-recheck.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
2011-05-07 Stefano Lattarini <address@hidden>
tests: fix spurious failure of txinfo21.test on FreeBSD
diff --git a/Makefile.am b/Makefile.am
index b25a30a..835f00a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -136,6 +136,9 @@ sc_tests_plain_make \
sc_tests_plain_autoconf \
sc_tests_plain_autoupdate \
sc_tests_plain_automake \
+sc_tests_plain_autom4te \
+sc_tests_plain_autoheader \
+sc_tests_plain_autoreconf \
sc_tests_here_document_format \
sc_tests_Exit_not_exit \
sc_tests_automake_fails \
@@ -366,25 +369,46 @@ sc_tests_plain_make:
## Tests should never call autoconf directly.
sc_tests_plain_autoconf:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoconf';
then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoconf\>';
then \
echo 'Do not run "autoconf" in the above tests. Use "$$AUTOCONF"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call autoupdate directly.
sc_tests_plain_autoupdate:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoupdate';
then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoupdate\>'; then \
echo 'Do not run "autoupdate" in the above tests. Use "$$AUTOUPDATE"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call automake directly.
sc_tests_plain_automake:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[
]*automake([^:]|$$)'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[
]*automake\>([^:]|$$)'; then \
echo 'Do not run "automake" in the above tests. Use "$$AUTOMAKE"
instead.' 1>&2; \
exit 1; \
fi
+## Tests should never call autoheader directly.
+sc_tests_plain_autoheader:
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoheader\>'; then \
+ echo 'Do not run "automake" in the above tests. Use "$$AUTOHEADER"
instead.' 1>&2; \
+ exit 1; \
+ fi
+
+## Tests should never call autoreconf directly.
+sc_tests_plain_autoreconf:
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoreconf\>'; then \
+ echo 'Do not run "automake" in the above tests. Use "$$AUTORECONF"
instead.' 1>&2; \
+ exit 1; \
+ fi
+
+## Tests should never call autom4te directly.
+sc_tests_plain_autom4te:
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autom4te\>';
then \
+ echo 'Do not run "automake" in the above tests. Use "$$AUTOM4TE"
instead.' 1>&2; \
+ exit 1; \
+ fi
+
## Tests should only use END and EOF for here documents
## (so that the next test is effective).
sc_tests_here_document_format:
@@ -420,14 +444,14 @@ sc_tests_automake_fails:
## Tests should never call aclocal directly.
sc_tests_plain_aclocal:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*aclocal';
then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*aclocal\>';
then \
echo 'Do not run "aclocal" in the above tests. Use "$$ACLOCAL"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call perl directly.
sc_tests_plain_perl:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*perl'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*perl\>'; then
\
echo 'Do not run "perl" in the above tests. Use "$$PERL" instead.'
1>&2; \
exit 1; \
fi
diff --git a/Makefile.in b/Makefile.in
index 6539f3c..1c241e5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -297,6 +297,9 @@ sc_tests_plain_make \
sc_tests_plain_autoconf \
sc_tests_plain_autoupdate \
sc_tests_plain_automake \
+sc_tests_plain_autom4te \
+sc_tests_plain_autoheader \
+sc_tests_plain_autoreconf \
sc_tests_here_document_format \
sc_tests_Exit_not_exit \
sc_tests_automake_fails \
@@ -1071,23 +1074,41 @@ sc_tests_plain_make:
fi
sc_tests_plain_autoconf:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoconf';
then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoconf\>';
then \
echo 'Do not run "autoconf" in the above tests. Use "$$AUTOCONF"
instead.' 1>&2; \
exit 1; \
fi
sc_tests_plain_autoupdate:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoupdate';
then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoupdate\>'; then \
echo 'Do not run "autoupdate" in the above tests. Use "$$AUTOUPDATE"
instead.' 1>&2; \
exit 1; \
fi
sc_tests_plain_automake:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[
]*automake([^:]|$$)'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[
]*automake\>([^:]|$$)'; then \
echo 'Do not run "automake" in the above tests. Use "$$AUTOMAKE"
instead.' 1>&2; \
exit 1; \
fi
+sc_tests_plain_autoheader:
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoheader\>'; then \
+ echo 'Do not run "automake" in the above tests. Use "$$AUTOHEADER"
instead.' 1>&2; \
+ exit 1; \
+ fi
+
+sc_tests_plain_autoreconf:
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoreconf\>'; then \
+ echo 'Do not run "automake" in the above tests. Use "$$AUTORECONF"
instead.' 1>&2; \
+ exit 1; \
+ fi
+
+sc_tests_plain_autom4te:
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autom4te\>';
then \
+ echo 'Do not run "automake" in the above tests. Use "$$AUTOM4TE"
instead.' 1>&2; \
+ exit 1; \
+ fi
+
sc_tests_here_document_format:
@if grep '<<' $(srcdir)/tests/*.test | grep -v 'END' | grep -v 'EOF';
then \
echo 'Use here documents with "END" and "EOF" only, for
greppability.' 1>&2; \
@@ -1116,13 +1137,13 @@ sc_tests_automake_fails:
fi
sc_tests_plain_aclocal:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*aclocal';
then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*aclocal\>';
then \
echo 'Do not run "aclocal" in the above tests. Use "$$ACLOCAL"
instead.' 1>&2; \
exit 1; \
fi
sc_tests_plain_perl:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*perl'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*perl\>'; then
\
echo 'Do not run "perl" in the above tests. Use "$$PERL" instead.'
1>&2; \
exit 1; \
fi
diff --git a/NEWS b/NEWS
index 2b4dff7..d0c04d3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
New in 1.11.0a:
+* WARNING: Future backward-incompatibilities!
+
+ - The Automake support for automatic de-ANSI-fication will be removed in
+ the next major Automake release (1.12).
+
* Miscellaneous changes:
- The `lzma' compression scheme and associated automake option `dist-lzma'
diff --git a/THANKS b/THANKS
index 16a1ef8..3d71419 100644
--- a/THANKS
+++ b/THANKS
@@ -37,6 +37,7 @@ Benoit Sigoure address@hidden
Bernard Giroud address@hidden
Bernard Urban address@hidden
Bernd Jendrissek address@hidden
+Bert Wesarg address@hidden
Bill Currie address@hidden
Bill Davidson address@hidden
Bill Fenner address@hidden
diff --git a/automake.in b/automake.in
index 3df48f5..b60c70b 100755
--- a/automake.in
+++ b/automake.in
@@ -8348,6 +8348,50 @@ sub generate_makefile ($$)
################################################################
+# Helper function for usage().
+sub print_autodist_files (@)
+{
+ my @lcomm = sort (&uniq (@_));
+
+ my @four;
+ format USAGE_FORMAT =
+ @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<
+ $four[0], $four[1], $four[2], $four[3]
+.
+ local $~ = "USAGE_FORMAT";
+
+ my $cols = 4;
+ my $rows = int(@lcomm / $cols);
+ my $rest = @lcomm % $cols;
+
+ if ($rest)
+ {
+ $rows++;
+ }
+ else
+ {
+ $rest = $cols;
+ }
+
+ for (my $y = 0; $y < $rows; $y++)
+ {
+ @four = ("", "", "", "");
+ for (my $x = 0; $x < $cols; $x++)
+ {
+ last if $y + 1 == $rows && $x == $rest;
+
+ my $idx = (($x > $rest)
+ ? ($rows * $rest + ($rows - 1) * ($x - $rest))
+ : ($rows * $x));
+
+ $idx += $y;
+ $four[$x] = $lcomm[$idx];
+ }
+ write;
+ }
+}
+
+
# Print usage information.
sub usage ()
{
@@ -8381,51 +8425,12 @@ Library files:
";
Automake::ChannelDefs::usage;
- my ($last, @lcomm);
- $last = '';
- foreach my $iter (sort ((@common_files, @common_sometimes)))
- {
- push (@lcomm, $iter) unless $iter eq $last;
- $last = $iter;
- }
-
- my @four;
- print "\nFiles which are automatically distributed, if found:\n";
- format USAGE_FORMAT =
- @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<
- $four[0], $four[1], $four[2], $four[3]
-.
- $~ = "USAGE_FORMAT";
-
- my $cols = 4;
- my $rows = int(@lcomm / $cols);
- my $rest = @lcomm % $cols;
-
- if ($rest)
- {
- $rows++;
- }
- else
- {
- $rest = $cols;
- }
-
- for (my $y = 0; $y < $rows; $y++)
- {
- @four = ("", "", "", "");
- for (my $x = 0; $x < $cols; $x++)
- {
- last if $y + 1 == $rows && $x == $rest;
-
- my $idx = (($x > $rest)
- ? ($rows * $rest + ($rows - 1) * ($x - $rest))
- : ($rows * $x));
-
- $idx += $y;
- $four[$x] = $lcomm[$idx];
- }
- write;
- }
+ print "\nFiles automatically distributed if found " .
+ "(always):\n";
+ print_autodist_files @common_files;
+ print "\nFiles automatically distributed if found " .
+ "(under certain conditions):\n";
+ print_autodist_files @common_sometimes;
print '
Report bugs to <@PACKAGE_BUGREPORT@>.
diff --git a/doc/automake.texi b/doc/automake.texi
index e5f977b..a02cea5 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -84,7 +84,8 @@ section entitled ``GNU Free Documentation License.''
@c Put the macros in the function index.
@syncodeindex ac fn
address@hidden Put everything else into one index (arbitrarily chosen to be the
concept index).
address@hidden Put everything else into one index (arbitrarily chosen to be the
address@hidden concept index).
@syncodeindex op cp
@syncodeindex tr cp
@syncodeindex cm cp
@@ -232,7 +233,7 @@ Building Programs and Libraries
* Java Support:: Compiling Java sources
* Vala Support:: Compiling Vala sources
* Support for Other Languages:: Compiling other languages
-* ANSI:: Automatic de-ANSI-fication (obsolete)
+* ANSI:: Automatic de-ANSI-fication (deprecated, soon
to be removed)
* Dependencies:: Automatic dependency tracking
* EXEEXT:: Support for executable extensions
@@ -2226,8 +2227,9 @@ source in case you need more recent versions.
@table @code
@item ansi2knr.c
@itemx ansi2knr.1
-These two files are used for de-ANSI-fication support (obsolete
address@hidden).
+These two files are used for de-ANSI-fication support (they are
+deprecated now, and @emph{will be removed} in the next major Automake
+release; @pxref{ANSI}).
@item compile
This is a wrapper for compilers that do not accept options @option{-c}
@@ -2447,20 +2449,8 @@ false.o: true.c
$(COMPILE) -DEXIT_CODE=1 -c true.c && mv true.o false.o
@end example
-Also, these explicit rules do not work if the obsolete de-ANSI-fication feature
-is used (@pxref{ANSI}). Supporting de-ANSI-fication requires a little
-more work:
-
address@hidden
-true_.o: true_.c false_.o
- $(COMPILE) -DEXIT_CODE=0 -c true_.c
-
-false_.o: true_.c
- $(COMPILE) -DEXIT_CODE=1 -c true_.c && mv true_.o false_.o
address@hidden example
-
As it turns out, there is also a much easier way to do this same task.
-Some of the above techniques are useful enough that we've kept the
+Some of the above technique is useful enough that we've kept the
example in the manual. However if you were to build @code{true} and
@code{false} in real life, you would probably use per-program
compilation flags, like so:
@@ -2476,10 +2466,9 @@ true_CPPFLAGS = -DEXIT_CODE=0
@end example
In this case Automake will cause @file{true.c} to be compiled twice,
-with different flags. De-ANSI-fication will work automatically. In
-this instance, the names of the object files would be chosen by
-automake; they would be @file{false-true.o} and @file{true-true.o}.
-(The name of the object files rarely matters.)
+with different flags. In this instance, the names of the object files
+would be chosen by automake; they would be @file{false-true.o} and
address@hidden (The name of the object files rarely matters.)
@node Invoking Automake
@@ -3033,8 +3022,9 @@ this way, e.g., @code{AC_PATH_XTRA} defines
@code{X_CFLAGS} and
if @code{AC_PATH_XTRA} is called.
@item AM_C_PROTOTYPES
-This is required when using the obsolete de-ANSI-fication feature; see
address@hidden
+This is required when using the deprecated de-ANSI-fication feature;
address@hidden @emph{It will be removed} in the next major Automake
+release.
@item AM_CONDITIONAL
This introduces an Automake conditional (@pxref{Conditionals}).
@@ -4010,8 +4000,10 @@ Autoconf Manual}).
Check to see if function prototypes are understood by the compiler. If
so, define @samp{PROTOTYPES} and set the output variables @code{U} and
@code{ANSI2KNR} to the empty string. Otherwise, set @code{U} to
address@hidden and @code{ANSI2KNR} to @samp{./ansi2knr}. Automake uses these
-values to implement the obsolete de-ANSI-fication feature.
address@hidden and @code{ANSI2KNR} to @samp{./ansi2knr}. Automake used these
+values to implement the deprecated de-ANSI-fication feature; however,
+support for @emph{that feature will be removed} in the next major Automake
+release, and then @emph{these macros and variables will go away as well}.
@item AM_CONFIG_HEADER
@acindex AM_CONFIG_HEADER
@@ -4611,7 +4603,7 @@ to build programs and libraries.
* Java Support:: Compiling Java sources
* Vala Support:: Compiling Vala sources
* Support for Other Languages:: Compiling other languages
-* ANSI:: Automatic de-ANSI-fication (obsolete)
+* ANSI:: Automatic de-ANSI-fication (deprecated, soon
to be removed)
* Dependencies:: Automatic dependency tracking
* EXEEXT:: Support for executable extensions
@end menu
@@ -4642,14 +4634,14 @@ programs. Most of the comments about these also apply
to libraries
@vindex bin_PROGRAMS
@vindex sbin_PROGRAMS
@vindex libexec_PROGRAMS
address@hidden pkglib_PROGRAMS
address@hidden pkglibexec_PROGRAMS
@vindex noinst_PROGRAMS
@vindex check_PROGRAMS
In a directory containing source that gets built into a program (as
opposed to a library or a script), the @code{PROGRAMS} primary is used.
Programs can be installed in @code{bindir}, @code{sbindir},
address@hidden, @code{pkglibdir}, @code{pkglibexecdir}, or not at all
address@hidden, @code{pkglibexecdir}, or not at all
(@code{noinst_}). They can also be built only for @samp{make check}, in
which case the prefix is @samp{check_}.
@@ -5838,8 +5830,8 @@ needs to be avoided: when a target should not be built
from sources.
We already saw such an example in @ref{true}; this happens when all
the constituents of a target have already been compiled and just need
to be combined using a @code{_LDADD} variable. Then it is necessary
-to define an empty @code{_SOURCES} variable, so that @command{automake} does
not
-compute a default.
+to define an empty @code{_SOURCES} variable, so that @command{automake}
+does not compute a default.
@example
bin_PROGRAMS = target
@@ -6764,13 +6756,14 @@ suffix rule handling (@pxref{Suffixes}).
@node ANSI
address@hidden Automatic de-ANSI-fication
address@hidden Automatic de-ANSI-fication (deprecated, soon to be removed)
@cindex de-ANSI-fication, defined
-The features described in this section are obsolete; you should not
-used any of them in new code, and they may be withdrawn in future
-Automake releases.
address@hidden features described in this section are deprecated; you must
+not use any of them in new code, and remove their use from older but
+still maintained code: they will be withdrawn in the next major
+Automake release.}
When the C language was standardized in 1989, there was a long
transition period where package developers needed to worry about
@@ -6824,8 +6817,9 @@ If no directory prefix is given, the files are assumed to
be in the
current directory.
Note that automatic de-ANSI-fication will not work when the package is
-being built for a different host architecture. That is because
@command{automake}
-currently has no way to build @command{ansi2knr} for the build machine.
+being built for a different host architecture. That is because
address@hidden currently has no way to build @command{ansi2knr}
+for the build machine.
@c FIXME: this paragraph might be better moved to an `upgrading' section.
@cindex @code{LTLIBOBJS} and @code{ansi2knr}
@@ -6919,10 +6913,10 @@ bin_PROGRAMS = liver$(EXEEXT)
The targets Automake generates are likewise given the @samp{$(EXEEXT)}
extension.
-The variables @code{TESTS} and @code{XFAIL_TESTS} (@pxref{Simple Tests}) are
also
-rewritten if they contain filenames that have been declared as programs
-in the same @file{Makefile}. (This is mostly useful when some programs
-from @code{check_PROGRAMS} are listed in @code{TESTS}.)
+The variables @code{TESTS} and @code{XFAIL_TESTS} (@pxref{Simple Tests})
+are also rewritten if they contain filenames that have been declared as
+programs in the same @file{Makefile}. (This is mostly useful when some
+programs from @code{check_PROGRAMS} are listed in @code{TESTS}.)
However, Automake cannot apply this rewriting to @command{configure}
substitutions. This means that if you are conditionally building a
@@ -8302,14 +8296,19 @@ is run. The default setting is @option{--best}.
@cmindex include
For the most part, the files to distribute are automatically found by
Automake: all source files are automatically included in a distribution,
-as are all @file{Makefile.am}s and @file{Makefile.in}s. Automake also
+as are all @file{Makefile.am} and @file{Makefile.in} files. Automake also
has a built-in list of commonly used files that are automatically
included if they are found in the current directory (either physically,
-or as the target of a @file{Makefile.am} rule). This list is printed by
address@hidden --help}. Also, files that are read by @command{configure}
+or as the target of a @file{Makefile.am} rule); this list is printed by
address@hidden --help}. Note that some files in this list are actually
+distributed only if other certain conditions hold (for example,
address@hidden The following example is covered by autodist-config-headers.test.
+the @file{config.h.top} and @file{config.h.bot} files are automatically
+distributed only if, e.g., @samp{AC_CONFIG_HEADERS([config.h])} is used
+in @file{configure.ac}). Also, files that are read by @command{configure}
(i.e.@: the source files corresponding to the files specified in various
Autoconf macros such as @code{AC_CONFIG_FILES} and siblings) are
-automatically distributed. Files included in @file{Makefile.am}s (using
+automatically distributed. Files included in a @file{Makefile.am} (using
@code{include}) or in @file{configure.ac} (using @code{m4_include}), and
helper scripts installed with @samp{automake --add-missing} are also
distributed.
@@ -8437,6 +8436,21 @@ to supply additional flags to @command{configure},
define them in the
provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
on the command line when invoking @command{make}.
+Still, developers are encouraged to strive to make their code buildable
+without requiring any special configure option; thus, in general, you
+shouldn't define @code{AM_DISTCHECK_CONFIGURE_FLAGS}. However, there
+might be few scenarios in which the use of this variable is justified.
+GNU @command{m4} offers an example. GNU @command{m4} configures by
+default with its experimental and seldom used "changeword" feature
+disabled; so in its case it is useful to have @command{make distcheck}
+run configure with the @option{--with-changeword} option, to ensure that
+the code for changeword support still compiles correctly.
+GNU @command{m4} also employs the @code{AM_DISTCHECK_CONFIGURE_FLAGS}
+variable to stress-test the use of @option{--program-prefix=g}, since at
+one point the @command{m4} build system had a bug where @command{make
+installcheck} was wrongly assuming it could blindly test "@command{m4}",
+rather than the just-installed "@command{gm4}".
+
@trindex distcheck-hook
If the @code{distcheck-hook} rule is defined in your top-level
@file{Makefile.am}, then it will be invoked by @code{distcheck} after
@@ -8640,10 +8654,10 @@ parallel-tests}).
@cindex Tests, expected failure
@cindex Expected test failure
address@hidden XFAIL_TESTS
You may define the variable @code{XFAIL_TESTS} to a list of tests
(usually a subset of @code{TESTS}) that are expected to fail. This will
reverse the result of those tests.
address@hidden XFAIL_TESTS
Automake ensures that each file listed in @code{TESTS} is built before
any tests are run; you can list both source and derived programs (or
@@ -8787,6 +8801,20 @@ use a command like this to run only a subset of the
tests:
env TESTS="foo.test bar.test" make -e check
@end example
+Note however that the command above will unconditionally overwrite the
address@hidden file, thus clobbering the recorded results
+of any previous testsuite run. This might be undesirable for packages
+whose testsuite takes long time to execute. Luckily, this problem can
+easily be avoided by overriding also @code{TEST_SUITE_LOG} at runtime;
+for example,
+
address@hidden
+env TEST_SUITE_LOG=partial.log TESTS="..." make -e check
address@hidden example
+
+will write the result of the partial testsuite runs to the
address@hidden, without touching @file{test-suite.log}.
+
@item
You can set the @code{TEST_LOGS} variable. By default, this variable is
computed at @command{make} run time from the value of @code{TESTS} as
@@ -8797,6 +8825,9 @@ set x subset*.log; shift
env TEST_LOGS="foo.log $*" make -e check
@end example
+The comments made above about @code{TEST_SUITE_LOG} overriding applies
+here too.
+
@item
@vindex RECHECK_LOGS
@cindex lazy test execution
@@ -9067,11 +9098,15 @@ implies options @option{readme-alpha} and
@option{check-news}.
@itemx @address@hidden/ansi2knr}
@cindex Option, @option{ansi2knr}
@opindex ansi2knr
-Turn on the obsolete de-ANSI-fication feature. @xref{ANSI}. If preceded by a
+Turn on the deprecated de-ANSI-fication feature (@pxref{ANSI}). Note
+that that feature and this option @emph{will be removed} in the next
+major Automake release.
+
+If preceded by a
path, the generated @file{Makefile.in} will look in the specified
directory to find the @file{ansi2knr} program. The path should be a
relative path to another directory in the same distribution (Automake
-currently does not check this).
+does not check this).
@item @option{check-news}
@cindex Option, @option{check-news}
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 9543aa5..b7ff3d1 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -252,6 +252,10 @@ sub _process_option_list (\%$@)
}
elsif (/^(.*\/)?ansi2knr$/)
{
+ # This feature is deprecated, will be removed in the next
+ # Automake major release.
+ msg 'obsolete', $where,
+ "automatic de-ANSI-fication support is deprecated\n";
# An option like "../lib/ansi2knr" is allowed. With no
# path prefix, we assume the required programs are in this
# directory. We save the actual option for later.
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 7ed17d6..2f553ed 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -105,15 +105,21 @@ am__base_list = \
am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
am__rst_section = sed 'p;s/./=/g;p;g'
# Put stdin (possibly several lines separated by ". ") in a box.
-am__text_box = $(AWK) '{ \
- n = split($$0, lines, "\\. "); max = 0; \
- for (i = 1; i <= n; ++i) \
- if (max < length(lines[i])) \
- max = length(lines[i]); \
- for (i = 0; i < max; ++i) line = line "="; \
- print line; \
- for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
- print line; \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{ \
+ n = split($$0, lines, "\\. "); max = 0; \
+ for (i = 1; i <= n; ++i) \
+ if (max < length(lines[i])) \
+ max = length(lines[i]); \
+ for (i = 0; i < max; ++i) \
+ line = line "="; \
+ print col line std; \
+ for (i = 1; i <= n; ++i) \
+ if (lines[i]) \
+ print col lines[i] std; \
+ print col line std; \
}'
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
@@ -394,12 +400,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
$(am__tty_colors); \
if $$exit; then \
- echo $(ECHO_N) "$$grn$(ECHO_C)"; \
+ col="$$grn"; \
else \
- echo $(ECHO_N) "$$red$(ECHO_C)"; \
+ col="$$red"; \
fi; \
- echo "$$msg" | $(am__text_box); \
- echo $(ECHO_N) "$$std$(ECHO_C)"; \
+ echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std"; \
$$exit
# Run all the tests.
diff --git a/lib/am/check.am b/lib/am/check.am
index 4d10ce9..0b54312 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -75,15 +75,21 @@ am__rst_title = sed 's/.*/ &
/;h;s/./=/g;p;x;p;g;p;s/.*//'
am__rst_section = sed 'p;s/./=/g;p;g'
# Put stdin (possibly several lines separated by ". ") in a box.
-am__text_box = $(AWK) '{ \
- n = split($$0, lines, "\\. "); max = 0; \
- for (i = 1; i <= n; ++i) \
- if (max < length(lines[i])) \
- max = length(lines[i]); \
- for (i = 0; i < max; ++i) line = line "="; \
- print line; \
- for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
- print line; \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{ \
+ n = split($$0, lines, "\\. "); max = 0; \
+ for (i = 1; i <= n; ++i) \
+ if (max < length(lines[i])) \
+ max = length(lines[i]); \
+ for (i = 0; i < max; ++i) \
+ line = line "="; \
+ print col line std; \
+ for (i = 1; i <= n; ++i) \
+ if (lines[i]) \
+ print col lines[i] std; \
+ print col line std; \
}'
# Solaris 10 'make', and several other traditional 'make' implementations,
@@ -213,12 +219,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
$(am__tty_colors); \
if $$exit; then \
- echo $(ECHO_N) "$$grn$(ECHO_C)"; \
+ col="$$grn"; \
else \
- echo $(ECHO_N) "$$red$(ECHO_C)"; \
+ col="$$red"; \
fi; \
- echo "$$msg" | $(am__text_box); \
- echo $(ECHO_N) "$$std$(ECHO_C)"; \
+ echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std"; \
$$exit
RECHECK_LOGS = $(TEST_LOGS)
@@ -398,14 +403,17 @@ check-TESTS: $(TESTS)
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
+ col="$$grn"; \
else \
- echo "$$red$$dashes"; \
+ col="$$red"; \
fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
+## Multi line coloring is problematic with "less -R", so we really need
+## to color each line individually.
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
diff --git a/m4/protos.m4 b/m4/protos.m4
index 427193b..f710293 100644
--- a/m4/protos.m4
+++ b/m4/protos.m4
@@ -13,6 +13,8 @@
AC_DEFUN([AM_C_PROTOTYPES],
[AC_REQUIRE([AC_C_PROTOTYPES])
+AC_DIAGNOSE([obsolete],
+ [$0: automatic de-ANSI-fication support is deprecated])
if test "$ac_cv_prog_cc_stdc" != no; then
U= ANSI2KNR=
else
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fecc864..0d3801b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -91,6 +91,7 @@ amassign.test \
ammissing.test \
amopt.test \
amsubst.test \
+ansi2knr-deprecation.test \
ansi.test \
ansi2.test \
ansi3.test \
@@ -114,6 +115,7 @@ autodist-acconfig-no-subdir.test \
autodist-aclocal-m4.test \
autodist-config-headers.test \
autodist-configure-no-subdir.test \
+autodist-no-duplicate.test \
autodist-stamp-vti.test \
autohdr.test \
autohdr2.test \
@@ -603,8 +605,12 @@ parallel-tests7.test \
parallel-tests8.test \
parallel-tests9.test \
parallel-tests10.test \
+parallel-tests-harderror.test \
parallel-tests-unreadable-log.test \
parallel-tests-subdir.test \
+parallel-tests-log-override-1.test \
+parallel-tests-log-override-2.test \
+parallel-tests-log-override-recheck.test \
parse.test \
percent.test \
percent2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index ae4528e..32d0ee7 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -108,15 +108,21 @@ am__base_list = \
am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
am__rst_section = sed 'p;s/./=/g;p;g'
# Put stdin (possibly several lines separated by ". ") in a box.
-am__text_box = $(AWK) '{ \
- n = split($$0, lines, "\\. "); max = 0; \
- for (i = 1; i <= n; ++i) \
- if (max < length(lines[i])) \
- max = length(lines[i]); \
- for (i = 0; i < max; ++i) line = line "="; \
- print line; \
- for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
- print line; \
+# Prefix each line by 'col' and terminate each with 'std', for coloring.
+# Multi line coloring is problematic with "less -R", so we really need
+# to color each line individually.
+am__text_box = $(AWK) '{ \
+ n = split($$0, lines, "\\. "); max = 0; \
+ for (i = 1; i <= n; ++i) \
+ if (max < length(lines[i])) \
+ max = length(lines[i]); \
+ for (i = 0; i < max; ++i) \
+ line = line "="; \
+ print col line std; \
+ for (i = 1; i <= n; ++i) \
+ if (lines[i]) \
+ print col lines[i] std; \
+ print col line std; \
}'
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
@@ -362,6 +368,7 @@ amassign.test \
ammissing.test \
amopt.test \
amsubst.test \
+ansi2knr-deprecation.test \
ansi.test \
ansi2.test \
ansi3.test \
@@ -385,6 +392,7 @@ autodist-acconfig-no-subdir.test \
autodist-aclocal-m4.test \
autodist-config-headers.test \
autodist-configure-no-subdir.test \
+autodist-no-duplicate.test \
autodist-stamp-vti.test \
autohdr.test \
autohdr2.test \
@@ -874,8 +882,12 @@ parallel-tests7.test \
parallel-tests8.test \
parallel-tests9.test \
parallel-tests10.test \
+parallel-tests-harderror.test \
parallel-tests-unreadable-log.test \
parallel-tests-subdir.test \
+parallel-tests-log-override-1.test \
+parallel-tests-log-override-2.test \
+parallel-tests-log-override-recheck.test \
parse.test \
percent.test \
percent2.test \
@@ -1283,12 +1295,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
$(am__tty_colors); \
if $$exit; then \
- echo $(ECHO_N) "$$grn$(ECHO_C)"; \
+ col="$$grn"; \
else \
- echo $(ECHO_N) "$$red$(ECHO_C)"; \
+ col="$$red"; \
fi; \
- echo "$$msg" | $(am__text_box); \
- echo $(ECHO_N) "$$std$(ECHO_C)"; \
+ echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std"; \
$$exit
# Run all the tests.
diff --git a/tests/ansi.test b/tests/ansi.test
index 7795f48..0aa000e 100755
--- a/tests/ansi.test
+++ b/tests/ansi.test
@@ -42,8 +42,8 @@ END
: > ansi2knr.1
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete
./configure
diff --git a/tests/ansi10.test b/tests/ansi10.test
index 88b8618..4ff2c86 100755
--- a/tests/ansi10.test
+++ b/tests/ansi10.test
@@ -55,8 +55,8 @@ main (int argc, char **argv)
END
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
# Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi2.test b/tests/ansi2.test
index 77ca2c6..504c8c3 100755
--- a/tests/ansi2.test
+++ b/tests/ansi2.test
@@ -35,6 +35,6 @@ END
: > ansi2knr.1
$ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
grep '^all[-a-z]*:.*ANSI2KNR' Makefile.in
diff --git a/tests/ansi2knr-deprecation.test b/tests/ansi2knr-deprecation.test
new file mode 100755
index 0000000..543d9c6
--- /dev/null
+++ b/tests/ansi2knr-deprecation.test
@@ -0,0 +1,69 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that the use of automatic de-ANSI-fication feature is deprecated.
+# That feature will be removed in the next major Automake release.
+
+. ./defs || Exit 1
+
+set -e
+
+warn_rx='automatic de-ANSI-fication.*deprecated'
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AM_C_PROTOTYPES
+END
+
+$ACLOCAL
+
+$AUTOCONF -Wall -Werror -Wno-obsolete
+$AUTOCONF -Wnone -Wobsolete -Werror 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep "^configure\\.in:5:.* AM_C_PROTOTYPES:.*$warn_rx" stderr
+
+sed '/AM_C_PROTOTYPES/d' configure.in > config.stub
+diff configure.in config.stub && fatal_ "failed to edit configure.in"
+rm -f configure.in
+
+cat > Makefile.stub <<'END'
+ANSI2KNR = :
+U =
+END
+
+for opt in ansi2knr lib/ansi2knr; do
+ # ansi2knr option in Makefile.am
+ cp config.stub configure.in
+ cp Makefile.stub Makefile.am
+ echo "AUTOMAKE_OPTIONS = $opt" >> Makefile.am
+ cat Makefile.am # For debugging.
+ $AUTOMAKE -Wno-obsolete
+ AUTOMAKE_fails
+ grep "^Makefile\.am:3:.*$warn_rx" stderr
+ AUTOMAKE_fails -Wnone -Wobsolete
+ grep "^Makefile\.am:3:.*$warn_rx" stderr
+ # ansi2knr option in configure.in
+ cp Makefile.stub Makefile.am
+ sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" config.stub > configure.in
+ cat configure.in # For debugging.
+ $AUTOMAKE -Wno-obsolete
+ AUTOMAKE_fails
+ grep "^configure\.in:2:.*$warn_rx" stderr
+ AUTOMAKE_fails -Wnone -Wobsolete
+ grep "^configure\.in:2:.*$warn_rx" stderr
+done
+
+:
diff --git a/tests/ansi3.test b/tests/ansi3.test
index e1e0c42..22ef485 100755
--- a/tests/ansi3.test
+++ b/tests/ansi3.test
@@ -51,8 +51,8 @@ export CFLAGS
# We use gcc and not gcc -traditional as the latter fails on some
# Linux boxes (Red Hat 5.1 in particular).
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a 2>stderr || { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'Makefile.am:1:.*ansi2knr\.c' stderr
CC='gcc' ./configure
diff --git a/tests/ansi3b.test b/tests/ansi3b.test
index ad222ff..0688781 100755
--- a/tests/ansi3b.test
+++ b/tests/ansi3b.test
@@ -52,8 +52,8 @@ export CFLAGS
# We use gcc and not gcc -traditional as the latter fails on some
# Linux boxes (Red Hat 5.1 in particular).
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a 2>stderr || { cat stderr >&2; Exit 1; }
cat stderr >&2
grep 'configure.in:2:.*ansi2knr\.1' stderr
CC='gcc' ./configure
diff --git a/tests/ansi4.test b/tests/ansi4.test
index 63250a9..0c0d339 100755
--- a/tests/ansi4.test
+++ b/tests/ansi4.test
@@ -37,6 +37,6 @@ END
: > hello.c
$ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
$FGREP 'ansi2knr.$(' Makefile.in
diff --git a/tests/ansi5.test b/tests/ansi5.test
index 2652cb7..d152be0 100755
--- a/tests/ansi5.test
+++ b/tests/ansi5.test
@@ -66,8 +66,8 @@ END
set -e
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
diff --git a/tests/ansi6.test b/tests/ansi6.test
index 10196ea..691614d 100755
--- a/tests/ansi6.test
+++ b/tests/ansi6.test
@@ -61,8 +61,8 @@ END
set -e
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
# Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi7.test b/tests/ansi7.test
index e97f517..9eae26b 100755
--- a/tests/ansi7.test
+++ b/tests/ansi7.test
@@ -63,8 +63,8 @@ END
set -e
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE -Wno-obsolete -a
# Sanity check: make sure it's ok to set ac_cv_prog_cc_stdc as we do.
test `grep -c ac_cv_prog_cc_stdc configure` -gt 1
diff --git a/tests/ansi8.test b/tests/ansi8.test
index 33f17dc..bcf99b1 100755
--- a/tests/ansi8.test
+++ b/tests/ansi8.test
@@ -26,5 +26,5 @@ bin_PROGRAMS = hello
END
$ACLOCAL
-AUTOMAKE_fails -a
+AUTOMAKE_fails -Wno-obsolete -a
grep AM_C_PROTOTYPES stderr
diff --git a/tests/ansi9.test b/tests/ansi9.test
index 4eb1820..ab78dda 100755
--- a/tests/ansi9.test
+++ b/tests/ansi9.test
@@ -50,8 +50,8 @@ mkdir sub
cp loadavg.c sub/sub.c
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing -Wno-override
+$AUTOCONF -Wno-obsolete
+$AUTOMAKE --add-missing -Wno-override -Wno-obsolete
$FGREP 'loadavg-loadavg$U.o: loadavg$U.c' Makefile.in
# The following rule should not exist, because the
diff --git a/tests/autodist-no-duplicate.test b/tests/autodist-no-duplicate.test
new file mode 100755
index 0000000..81464c0
--- /dev/null
+++ b/tests/autodist-no-duplicate.test
@@ -0,0 +1,52 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that there are no duplicates in the list of files automatically
+# distributed by automake.
+
+. ./defs || Exit 1
+
+set -e
+
+re='Files .*automatically distributed.*if found'
+
+# The automake manual states that the list of automatically-distributed
+# files should be given by `automake --help'.
+
+list1=`$AUTOMAKE --help \
+ | sed -n "/^$re.*always/,/^ *$/p" \
+ | sed 1d`
+list1=`echo $list1`
+
+list2=`$AUTOMAKE --help \
+ | sed -n "/^$re.*under certain conditions/,/^ *$/p" \
+ | sed 1d`
+list2=`echo $list2`
+
+test -n "$list1"
+test -n "$list2"
+
+st=0
+for i in 1 2; do
+ eval list=\${list$i}
+ for f in $list; do echo $f; done | sort > files$i.lst
+ uniq files$i.lst > files$i.uniq
+ cat files$i.lst
+ cat files$i.uniq
+ diff files$i.lst files$i.uniq || st=1
+done
+
+Exit $st
diff --git a/tests/autodist-subdir.test b/tests/autodist-subdir.test
index db694f8..83b293e 100755
--- a/tests/autodist-subdir.test
+++ b/tests/autodist-subdir.test
@@ -39,33 +39,8 @@ $AUTOCONF
# The automake manual states that the list of automatically-distributed
# files should be given by `automake --help'.
list=`$AUTOMAKE --help \
- | sed -n '/^Files .*automatically distributed.*if found/,/^ *$/p' \
+ | sed -n '/^Files.*automatically distributed.*if found.*always/,/^
*$/p' \
| sed 1d`
-list=`for f in $list; do
- case $f in
- configure|configure.in|configure.ac)
- # See test 'autodist-configure-no-subdir.test'.
- ;;
- aclocal.m4)
- # This file should be distributed only when it is a real
- # dependency for configure. Anyway, not a check to be
- # performed in this test.
- ;;
- acconfig.h)
- # Works only when it really exists, not when it is a
- # target in Makefile.am.
- ;;
- stamp-vti)
- # Works only when using info_TEXINFOS and version.texi.
- ;;
- config.h.bot|config.h.top)
- # Works only when the AC_CONFIG_HADERS macro is used.
- ;;
- *)
- echo $f
- ;;
- esac
- done`
# Normalize whitespace, just in case.
list=`echo $list`
diff --git a/tests/autodist.test b/tests/autodist.test
index 34b9526..9294bc3 100755
--- a/tests/autodist.test
+++ b/tests/autodist.test
@@ -25,15 +25,13 @@ set -e
# Ensure we are run from the right directory.
# (The last thing we want is to delete some random user files.)
-test -f ../defs-static
+test -f ../defs
rm -f *
cat > configure.in <<END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
-## Will avoid useless regeneration of aclocal.m4, configure, etc.
-AM_MAINTAINER_MODE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
@@ -44,33 +42,8 @@ $AUTOCONF
# The automake manual states that the list of automatically-distributed
# files should be given by `automake --help'.
list=`$AUTOMAKE --help \
- | sed -n '/^Files .*automatically distributed.*if found/,/^ *$/p' \
+ | sed -n '/^Files.*automatically distributed.*if found.*always/,/^
*$/p' \
| sed 1d`
-list=`for f in $list; do
- case $f in
- configure|configure.in|configure.ac)
- # See test 'autodist-configure-no-subdir.test'.
- ;;
- aclocal.m4)
- # This file should be distributed only when it is a real
- # dependency for configure. Anyway, not a check to be
- # performed in this test.
- ;;
- acconfig.h)
- # Works only when it really exists, not when it is a
- # target in Makefile.am.
- ;;
- stamp-vti)
- # Works only when using info_TEXINFOS and version.texi.
- ;;
- config.h.bot|config.h.top)
- # Works only when the AC_CONFIG_HADERS macro is used.
- ;;
- *)
- echo $f
- ;;
- esac
- done`
# Normalize whitespace, just in case.
list=`echo $list`
diff --git a/tests/cxxansi.test b/tests/cxxansi.test
index 8bbe9b2..9d6fd6e 100755
--- a/tests/cxxansi.test
+++ b/tests/cxxansi.test
@@ -39,7 +39,7 @@ END
: > jane.C
$ACLOCAL
-$AUTOMAKE
+$AUTOMAKE -Wno-obsolete
$FGREP 'jane$U' Makefile.in && Exit 1
$FGREP 'doe$U' Makefile.in
diff --git a/tests/lex-clean-cxx.test b/tests/lex-clean-cxx.test
index 3400977..3f566c4 100755
--- a/tests/lex-clean-cxx.test
+++ b/tests/lex-clean-cxx.test
@@ -64,6 +64,10 @@ cp parsefoo.lxx parsebar.ll
cat > mainfoo.cc << 'END'
// This file should contain valid C++ but invalid C.
using namespace std;
+int yywrap (void)
+{
+ return 1;
+}
int main (int argc, char **argv)
{
extern int yylex (void);
diff --git a/tests/lex-depend-cxx.test b/tests/lex-depend-cxx.test
index 860a96f..9b5416d 100755
--- a/tests/lex-depend-cxx.test
+++ b/tests/lex-depend-cxx.test
@@ -53,6 +53,10 @@ cat > joe.ll << 'END'
.
%%
#include "my-hdr.hxx"
+int yywrap (void)
+{
+ return 1;
+}
int main (int argc, char **argv)
{
printf("Hello, World!\n");
diff --git a/tests/libobj8.test b/tests/libobj8.test
index c06746b..206bca6 100755
--- a/tests/libobj8.test
+++ b/tests/libobj8.test
@@ -45,6 +45,6 @@ END
: > ansi2knr.c
$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$AUTOMAKE -Wno-obsolete || Exit 1
grep 'strsignal_.c:' Makefile.in
diff --git a/tests/parallel-tests-harderror.test
b/tests/parallel-tests-harderror.test
new file mode 100755
index 0000000..8680e29
--- /dev/null
+++ b/tests/parallel-tests-harderror.test
@@ -0,0 +1,98 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: DISABLE_HARD_ERRORS
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat > Makefile.am << 'END'
+SUBDIRS = . sub
+TESTS = foo.test
+XFAIL_TESTS = foo.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > sub/Makefile.am << 'END'
+TESTS = bar.test
+XFAIL_TESTS = $(TESTS)
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test <<'END'
+#! /bin/sh
+exit 99
+END
+chmod a+x foo.test
+cp foo.test sub/bar.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# DISABLE_HARD_ERRORS is not defined as a make variable, so that it
+# should be possible to define either from the environment or from
+# command-line, also when recursive make invocations are involved,
+# and also without using the `-e' make flag; this should work also
+# for non-GNU make. Moreover, it shouldn't be necessary to define
+# DISABLE_HARD_ERRORS to "yes" to really disable hard errors: any
+# non-empty value should do.
+$MAKE check DISABLE_HARD_ERRORS=yes
+DISABLE_HARD_ERRORS=x $MAKE check
+
+# But an empty values for DISABLE_HARD_ERRORS means that hard errors
+# are not to be counted like normal failures.
+
+$MAKE check DISABLE_HARD_ERRORS='' && Exit 1
+cat test-suite.log
+grep '^FAIL: foo\.test .*exit.*99' test-suite.log
+
+cd sub
+# The `-e' is wanted here.
+DISABLE_HARD_ERRORS='' $MAKE -e check && Exit 1
+cat test-suite.log
+grep '^FAIL: bar\.test .*exit.*99' test-suite.log
+cd ..
+
+# Check the distributions.
+$MAKE DISABLE_HARD_ERRORS=y distcheck
+
+# Finally, DISABLE_HARD_ERRORS should work also when the developer
+# sets it directly in Makefile.am or Makefile. And its effects
+# should remain local to that specific Makefile, obviously.
+
+echo 'DISABLE_HARD_ERRORS = yes' >> Makefile.am
+$AUTOMAKE Makefile
+./config.status Makefile
+VERBOSE=yes $MAKE check && Exit 1
+grep '^FAIL' test-suite.log && Exit 1
+grep '^FAIL: bar\.test .*exit.*99' sub/test-suite.log
+
+echo 'DISABLE_HARD_ERRORS = zardoz' >> sub/Makefile
+VERBOSE=yes $MAKE check
+
+:
diff --git a/tests/parallel-tests-log-override-1.test
b/tests/parallel-tests-log-override-1.test
new file mode 100755
index 0000000..6e98380
--- /dev/null
+++ b/tests/parallel-tests-log-override-1.test
@@ -0,0 +1,112 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG).
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = pass.test skip.test xfail.test
+XFAIL_TESTS = xfail.test
+EXTRA_DIST = $(TESTS)
+END
+
+cat > pass.test <<'END'
+#! /bin/sh
+exit 0
+END
+
+cat > skip.test <<'END'
+#! /bin/sh
+echo "% test skipped %"
+exit 77
+END
+
+cat > xfail.test <<'END'
+#! /bin/sh
+echo "# expected failure #"
+exit 1
+END
+
+chmod a+x *.test
+
+test_log_edit ()
+{
+ sed -e "s|^ *$me 1\.0:.*$| $me 1.0: ???|" \
+ -e "s|^=====*|=======================|" $*
+}
+
+test_log_expected ()
+{
+ test_log_edit orig > exp
+ test_log_edit $1 > got
+ diff exp got || Exit 1
+ rm -f exp got
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check
+ls -l
+cat test-suite.log
+cp test-suite.log orig
+
+$MAKE clean
+test -f test-suite.log && Exit 99 # Sanity check.
+
+# Check that we can override the testsuite log file at runtime.
+TEST_SUITE_LOG=zardoz.log $MAKE -e check
+ls -l
+test ! -f test-suite.log
+cat zardoz.log
+test_log_expected zardoz.log
+# Sanity check the distribution too (this also does minimal checks on
+# VPATH support).
+TEST_SUITE_LOG=zardoz.log $MAKE -e distcheck
+
+# Check that cleanup rules remove the correct file even when
+# user overrides are in place.
+cp orig test-suite.log
+TEST_SUITE_LOG=zardoz.log $MAKE -e clean
+ls -l
+test ! -f zardoz.log
+diff orig test-suite.log
+
+# Check that the default testsuite log doesn't get unduly modified.
+# Also check that the testsuite log file doesn't need to be named
+# accordingly to the `*.log' pattern.
+chmod a-w test-suite.log
+TEST_SUITE_LOG=TheLogFile $MAKE -e check
+ls -l
+diff orig test-suite.log
+test_log_expected TheLogFile
+TEST_SUITE_LOG=TheLogFile $MAKE -e clean
+ls -l
+test ! -f TheLogFile
+diff orig test-suite.log
+
+:
diff --git a/tests/parallel-tests-log-override-2.test
b/tests/parallel-tests-log-override-2.test
new file mode 100755
index 0000000..649360c
--- /dev/null
+++ b/tests/parallel-tests-log-override-2.test
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: runtime redefinition of:
+# - $(TEST_SUITE_LOG) and $(TESTS)
+# - $(TEST_SUITE_LOG) and $(TEST_LOGS)
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = pass.test pass2.test skip.test skip2.test fail.test
+END
+
+cat > pass.test <<'END'
+#! /bin/sh
+exit 0
+END
+
+cp pass.test pass2.test
+
+cat > skip.test <<'END'
+#! /bin/sh
+echo "% skipped test %"
+exit 77
+END
+
+cp skip.test skip2.test
+
+cat > fail.test <<'END'
+#! /bin/sh
+exit 1
+END
+
+chmod a+x *.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+for test_list_override in \
+ 'TESTS=pass.test skip.test' \
+ 'TEST_LOGS=pass.log skip.log'
+do
+ env TEST_SUITE_LOG=partial.log "$test_list_override" \
+ $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ cat stdout
+ ls -l
+ cat pass.log
+ cat skip.log
+ cat partial.log
+ test ! -f test-suite.log
+ test ! -f pass2.log
+ test ! -f skip2.log
+ test ! -f fail.log
+ grep '^PASS: .*pass\.test' stdout
+ grep '^SKIP: .*skip\.test' stdout
+ $FGREP 'skip.test' partial.log
+ $FGREP '% skipped test %' partial.log
+ for t in pass2 skip2 fail; do
+ $FGREP "$t.test" stdout && Exit 1
+ $FGREP "$t.test" partial.log && Exit 1
+ done
+ rm -f *.log
+done
+
+:
diff --git a/tests/parallel-tests-log-override-recheck.test
b/tests/parallel-tests-log-override-recheck.test
new file mode 100755
index 0000000..8a50d29
--- /dev/null
+++ b/tests/parallel-tests-log-override-recheck.test
@@ -0,0 +1,92 @@
+#! /bin/sh
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests features: runtime redefinition of $(TEST_SUITE_LOG)
+# for the recheck target.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = foo.test bar.test baz.test
+END
+
+cat > foo.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 0
+END
+
+cat > bar.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 99
+END
+
+cat > baz.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit ${BAZ_EXIT_STATUS-1}
+END
+
+chmod a+x *.test
+
+unset BAZ_EXIT_STATUS || :
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE check >stdout && { cat stdout; Exit 1; }
+cat stdout
+
+chmod a-rw test-suite.log
+TEST_SUITE_LOG=my.log $MAKE -e recheck >stdout \
+ && { cat stdout; Exit 1; }
+cat stdout
+ls -l
+grep '^2 of 2 .*failed' stdout
+for x in stdout my.log; do
+ $FGREP foo.test $x && Exit 1
+ $FGREP bar.test $x
+ $FGREP baz.test $x
+done
+
+chmod a-rw my.log
+BAZ_EXIT_STATUS=0 TEST_SUITE_LOG=my2.log $MAKE -e recheck >stdout \
+ && { cat stdout; Exit 1; }
+cat stdout
+ls -l
+grep '^1 of 2 .*failed' stdout
+$FGREP foo.test stdout && Exit 1
+$FGREP bar.test stdout
+$FGREP baz.test stdout
+$FGREP foo.test my2.log && Exit 1
+$FGREP bar.test my2.log
+$FGREP baz.test my2.log && Exit 1
+
+chmod u+r test-suite.log my.log
+$FGREP baz.test test-suite.log
+$FGREP baz.test my.log
+
+:
diff --git a/tests/parallel-tests.test b/tests/parallel-tests.test
index 399b23b..54f0cd5 100755
--- a/tests/parallel-tests.test
+++ b/tests/parallel-tests.test
@@ -19,7 +19,6 @@
# - clean
# - TEST_SUITE_LOG
# - dependencies between tests
-# - DISABLE_HARD_ERRORS
# - TESTS
# - TEST_LOGS
# - RECHECK_LOGS
@@ -68,12 +67,13 @@ $AUTOCONF
$AUTOMAKE -a
./configure
-# No hard errors: all tests should be run, there should be one failure.
-env DISABLE_HARD_ERRORS=yes $MAKE -e check >stdout && { cat stdout; Exit 1; }
+
+$MAKE check >stdout && { cat stdout; Exit 1; }
cat stdout
-test `grep -c '^FAIL' stdout` -eq 1
+# There should be two errors: bar.test is a hard error.
+test `grep -c '^FAIL' stdout` -eq 2
test -f mylog.log
-test `grep -c '^FAIL' mylog.log` -eq 1
+test `grep -c '^FAIL' mylog.log` -eq 2
test -f baz.log
test -f bar.log
test -f foo.log
@@ -89,19 +89,11 @@ test ! -f foo.log
test ! -f mylog.log
test -f unrelated.log
-$MAKE clean
-$MAKE check >stdout && { cat stdout; Exit 1; }
-cat stdout
-# Now, there should be two errors: bar.test is a hard error.
-test `grep -c '^FAIL' stdout` -eq 2
-test `grep -c '^FAIL' mylog.log` -eq 2
-
# Check dependencies: baz.test needs to run before bar.test,
# but foo.test is not needed.
# Note that this usage has a problem: the summary will only
# take bar.log into account, because the $(TEST_SUITE_LOG) rule
# does not "see" baz.log. Hmm.
-$MAKE clean
env TESTS='bar.test' $MAKE -e check && Exit 1
test -f baz.log
test -f bar.log
diff --git a/tests/yacc-cxx.test b/tests/yacc-cxx.test
index eacf628..e4afd95 100755
--- a/tests/yacc-cxx.test
+++ b/tests/yacc-cxx.test
@@ -21,6 +21,8 @@
required=yacc
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CXX
AC_PROG_YACC
@@ -32,7 +34,7 @@ bin_PROGRAMS = foo1 foo2 foo3 foo4
foo1_SOURCES = parse1.yy foo.cc
foo2_SOURCES = parse2.y++ bar.c++
foo3_SOURCES = parse3.yxx foo.cc
-foo4_SOURCES = parse4.ypp bar.cxx
+foo4_SOURCES = parse4.ypp bar2.cxx
foo3_YFLAGS = -v
foo4_YFLAGS = $(foo3_YFLAGS)
@@ -67,7 +69,7 @@ int main (int argc, char **argv)
}
END
cp foo.cc bar.c++
-cp foo.cc bar.cxx
+cp foo.cc bar2.cxx
$ACLOCAL
$AUTOCONF
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-459-gf2ed281,
Stefano Lattarini <=