[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, ad-parallel-tests, updated.
From: |
Ralf Wildenhues |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, ad-parallel-tests, updated. Release-1-10-292-g83b03f3 |
Date: |
Tue, 02 Jun 2009 18:19:35 +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=83b03f377b6b3614497d81e97fccd4fe59299811
The branch, ad-parallel-tests has been updated
via 83b03f377b6b3614497d81e97fccd4fe59299811 (commit)
via 8f33eec4110c89f2963a4e3910c8149c59e63b23 (commit)
via c4e28424e75dd75620064fd9a918249857855877 (commit)
via 1b67aa701d5d105dfbf0d2a4bb5ab70fbc0e5158 (commit)
via 868fb04577daf9c47a4a2bcdd9a92cb78e6cf056 (commit)
via 66c2dcaa51c7a1216053dc2dde2d704aa17deef6 (commit)
from df4f77d029cd7fe42722ab402bad105081d093b1 (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 -----------------------------------------------------------------
commit 83b03f377b6b3614497d81e97fccd4fe59299811
Author: Ralf Wildenhues <address@hidden>
Date: Sun Mar 29 01:17:51 2009 +0100
parallel-tests: New target recheck-html.
* lib/am/check.am [PARALLEL_TESTS] (recheck-html): New phony,
recursive target. Factor common implementation with
`check-html'.
* doc/automake.texi (Tests): Document recheck-html.
* tests/parallel-tests2.test: Test it.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit 8f33eec4110c89f2963a4e3910c8149c59e63b23
Author: Ralf Wildenhues <address@hidden>
Date: Sat Mar 28 22:58:34 2009 +0100
parallel-tests: redo lazy checking: recheck and RECHECK_LOGS.
Replace the LAZY_TEST_SUITE API with a simpler yet more powerful
one: RECHECK_LOGS specifies those tests which are to be removed
in any case before testing. Provide a `recheck' convenience
target to set RECHECK_LOGS to all failed and unexpectedly passed
tests. Document several ways to limit the set of tests run.
* lib/am/check.am [PARALLEL_TESTS] (RECHECK_LOGS): New variable,
default to $(TESTS_LOGS).
(check-TESTS): Remove $(RECHECK_LOGS) not $(TEST_LOGS). Drop use
of LAZY_TEST_SUITE.
($(TEST_SUITE_LOG)): Do not output note about lazy rerun, as
LAZY_TEST_SUITE is gone.
(recheck): New target.
(recheck-am, recheck-TESTS): New internal targets.
* doc/automake.texi (Tests): Update @vindex for TESTS and
TEST_LOGS. Replace description of LAZY_TEST_SUITE with a list
of ways the set of tests to be run can be modified. Document
RECHECK_LOGS and the recheck target.
* tests/defs.in: Unset RECHECK_LOGS not LAZY_TEST_SUITE.
* tests/parallel-tests.test: Adjust, replacing LAZY_TEST_SUITE
with corresponding RECHECK_LOGS settings, and add another
RECHECK_LOGS test.
* tests/parallel-tests9.test: New test, test `recheck'.
* tests/Makefile.am: Update.
Suggestion and different implementation by Akim Demaille.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit c4e28424e75dd75620064fd9a918249857855877
Author: Ralf Wildenhues <address@hidden>
Date: Sat Mar 28 22:52:22 2009 +0100
parallel-tests: do not mark check-TESTS as `.MAKE'.
* lib/am/check.am [PARALLEL_TESTS] (.MAKE): Remove check-TESTS.
This rule removes files, which should not be executed with BSD
`make -n'.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit 1b67aa701d5d105dfbf0d2a4bb5ab70fbc0e5158
Author: Ralf Wildenhues <address@hidden>
Date: Sat Mar 28 21:49:02 2009 +0100
parallel-tests: warn about $(srcdir), $(top_srcdir) in TESTS.
* automake.in (handle_tests): Warn about portability issue
concerning generated TESTS files listed with a `$(srcdir)/'
or `$(top_srcdir)/' prefix.
* doc/automake.texi (TESTS): Document this issue. Mention that
the parallel-tests driver is still experimental.
* tests/parallel-tests8.test: New test.
* tests/Makefile.am: Update.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit 868fb04577daf9c47a4a2bcdd9a92cb78e6cf056
Author: Ralf Wildenhues <address@hidden>
Date: Sat Mar 28 21:01:43 2009 +0100
check-html: Always create HTML output, note conversion failure.
* lib/am/check.am (check-html): Create `$(TEST_SUITE_HTML)' in
any case. Exit unsuccessfully if HTML creation failed.
* tests/parallel-tests2.test: Amend test to expose this.
Signed-off-by: Ralf Wildenhues <address@hidden>
commit 66c2dcaa51c7a1216053dc2dde2d704aa17deef6
Author: Ralf Wildenhues <address@hidden>
Date: Wed Mar 11 23:55:26 2009 +0100
parallel-tests: per-extension test driver: <EXT>_LOG_COMPILER.
For test files with extension <ext>, introduce the internal
variable <EXT>_LOG_COMPILE, which expands to
$(<EXT>_LOG_COMPILER) $(AM_<EXT>_LOG_FLAGS) $(<EXT>_LOG_FLAGS).
Turn also the lib/Automake/tests testsuite over to the new
test driver.
* doc/automake.texi (Tests): Document `EXT_LOG_COMPILER' and
`EXT_LOG_FLAGS'.
* lib/am/check2.am: Insert `%COMPILE%' right before test.
* automake.in (handle_tests): Substitute `COMPILE' for check2,
empty for tests without extension, and `$(ext_LOG_COMPILE)' for
extension `ext'. In the latter case, define it from the public
components.
* configure.ac (AM_INIT_AUTOMAKE): Use `parallel-test' globally.
* tests/Makefile.am (AUTOMAKE_OPTIONS): Remove, not needed here
any more.
* lib/Automake/tests/Makefile.am (TESTS_ENVIRONMENT): Split ...
(PL_LOG_COMPILER, PL_LOG_FLAGS): ... into these new variables.
(TESTS_EXTENSIONS): New variable, initialize to `.pl'.
* tests/parallel-tests7.test: New test.
* tests/Makefile.am: Update.
Suggestion by Akim Demaille.
Signed-off-by: Ralf Wildenhues <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 82 +++++
automake.in | 29 ++-
configure.ac | 2 +-
doc/automake.texi | 101 ++++++-
lib/Automake/tests/.gitignore | 2 +
lib/Automake/tests/Makefile.am | 7 +-
lib/Automake/tests/Makefile.in | 344 ++++++++++++++------
lib/am/check.am | 47 ++-
lib/am/check2.am | 2 +-
tests/Makefile.am | 4 +-
tests/Makefile.in | 47 ++-
tests/defs.in | 2 +-
tests/parallel-tests.test | 15 +-
tests/parallel-tests2.test | 13 +
.../{parallel-tests4.test => parallel-tests7.test} | 28 ++-
.../{parallel-tests5.test => parallel-tests8.test} | 61 ++--
.../{parallel-tests2.test => parallel-tests9.test} | 19 +-
17 files changed, 608 insertions(+), 197 deletions(-)
create mode 100644 lib/Automake/tests/.gitignore
copy tests/{parallel-tests4.test => parallel-tests7.test} (73%)
copy tests/{parallel-tests5.test => parallel-tests8.test} (52%)
copy tests/{parallel-tests2.test => parallel-tests9.test} (75%)
diff --git a/ChangeLog b/ChangeLog
index 7d360d0..cc711a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,85 @@
+2009-03-29 Ralf Wildenhues <address@hidden>
+ Akim Demaille <address@hidden>
+
+ parallel-tests: New target recheck-html.
+ * lib/am/check.am [PARALLEL_TESTS] (recheck-html): New phony,
+ recursive target. Factor common implementation with
+ `check-html'.
+ * doc/automake.texi (Tests): Document recheck-html.
+ * tests/parallel-tests2.test: Test it.
+
+2009-03-28 Ralf Wildenhues <address@hidden>
+ Akim Demaille <address@hidden>
+
+ parallel-tests: redo lazy checking: recheck and RECHECK_LOGS.
+ Replace the LAZY_TEST_SUITE API with a simpler yet more powerful
+ one: RECHECK_LOGS specifies those tests which are to be removed
+ in any case before testing. Provide a `recheck' convenience
+ target to set RECHECK_LOGS to all failed and unexpectedly passed
+ tests. Document several ways to limit the set of tests run.
+ * lib/am/check.am [PARALLEL_TESTS] (RECHECK_LOGS): New variable,
+ default to $(TESTS_LOGS).
+ (check-TESTS): Remove $(RECHECK_LOGS) not $(TEST_LOGS). Drop use
+ of LAZY_TEST_SUITE.
+ ($(TEST_SUITE_LOG)): Do not output note about lazy rerun, as
+ LAZY_TEST_SUITE is gone.
+ (recheck): New target.
+ (recheck-am, recheck-TESTS): New internal targets.
+ * doc/automake.texi (Tests): Update @vindex for TESTS and
+ TEST_LOGS. Replace description of LAZY_TEST_SUITE with a list
+ of ways the set of tests to be run can be modified. Document
+ RECHECK_LOGS and the recheck target.
+ * tests/defs.in: Unset RECHECK_LOGS not LAZY_TEST_SUITE.
+ * tests/parallel-tests.test: Adjust, replacing LAZY_TEST_SUITE
+ with corresponding RECHECK_LOGS settings.
+ * tests/parallel-tests9.test: New tests.
+ * tests/Makefile.am: Update.
+ Suggestion and different implementation by Akim Demaille.
+
+ parallel-tests: do not mark check-TESTS as `.MAKE'.
+ * lib/am/check.am [PARALLEL_TESTS] (.MAKE): Remove check-TESTS.
+ This rule removes files, which should not be executed with BSD
+ `make -n'.
+
+ parallel-tests: warn about $(srcdir), $(top_srcdir) in TESTS.
+ * automake.in (handle_tests): Warn about portability issue
+ concerning generated TESTS files listed with a `$(srcdir)/'
+ or `$(top_srcdir)/' prefix.
+ * doc/automake.texi (TESTS): Document this issue. Mention that
+ the parallel-tests driver is still experimental.
+ * tests/parallel-tests8.test: New test.
+ * tests/Makefile.am: Update.
+
+ check-html: Always create HTML output, note conversion failure.
+ * lib/am/check.am (check-html): Create `$(TEST_SUITE_HTML)' in
+ any case. Exit unsuccessfully if HTML creation failed.
+ * tests/parallel-tests2.test: Amend test to expose this.
+
+2009-03-24 Ralf Wildenhues <address@hidden>
+
+ parallel-tests: per-extension test driver: <EXT>_LOG_COMPILER.
+ For test files with extension <ext>, introduce the internal
+ variable <EXT>_LOG_COMPILE, which expands to
+ $(<EXT>_LOG_COMPILER) $(AM_<EXT>_LOG_FLAGS) $(<EXT>_LOG_FLAGS).
+ Turn also the lib/Automake/tests testsuite over to the new
+ test driver.
+ * doc/automake.texi (Tests): Document `EXT_LOG_COMPILER' and
+ `EXT_LOG_FLAGS'.
+ * lib/am/check2.am: Insert `%COMPILE%' right before test.
+ * automake.in (handle_tests): Substitute `COMPILE' for check2,
+ empty for tests without extension, and `$(ext_LOG_COMPILE)' for
+ extension `ext'. In the latter case, define it from the public
+ components.
+ * configure.ac (AM_INIT_AUTOMAKE): Use `parallel-test' globally.
+ * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove, not needed here
+ any more.
+ * lib/Automake/tests/Makefile.am (TESTS_ENVIRONMENT): Split ...
+ (PL_LOG_COMPILER, PL_LOG_FLAGS): ... into these new variables.
+ (TESTS_EXTENSIONS): New variable, initialize to `.pl'.
+ * tests/parallel-tests7.test: New test.
+ * tests/Makefile.am: Update.
+ Suggestion by Akim Demaille.
+
2009-03-22 Ralf Wildenhues <address@hidden>
parallel-tests: also record logs of SKIPped tests.
diff --git a/automake.in b/automake.in
index 2ab266d..ce20cce 100755
--- a/automake.in
+++ b/automake.in
@@ -4789,6 +4789,13 @@ sub handle_tests
return $obj
if $val =~ /address@hidden@$/;
$obj =~ s/\$\(EXEEXT\)$//o;
+
+ if ($val =~ /(\$\((top_)?srcdir\))\//o)
+ {
+ msg ('error', $subvar->rdef ($cond)->location,
+ "parallel-tests: using `$1' in TESTS is currently
broken: `$val'");
+ }
+
foreach my $test_suffix (@test_suffixes)
{
next
@@ -4801,6 +4808,7 @@ sub handle_tests
GENERIC => 0,
OBJ => $obj,
SOURCE => $val,
+ COMPILE => '',
EXT => '');
return $obj;
});
@@ -4825,12 +4833,21 @@ sub handle_tests
$post = '.log';
$prev = $cur;
$nhelper++;
- $output_rules .= file_contents ('check2', new Automake::Location,
- GENERIC => 1,
- OBJ => '',
- SOURCE => '$<',
- EXT => $test_suffix)
- if $test_suffix ne $at_exeext && $test_suffix ne '';
+ if ($test_suffix ne $at_exeext && $test_suffix ne '')
+ {
+ (my $ext = $test_suffix) =~ s/^\.//;
+ $ext = uc $ext;
+ my $compile = $ext . '_LOG_COMPILE';
+ define_variable ($compile,
+ '$(' . $ext . '_LOG_COMPILER) $(AM_' . $ext
. '_LOG_FLAGS)'
+ . ' $(' . $ext . '_LOG_FLAGS)', INTERNAL);
+ $output_rules .= file_contents ('check2', new
Automake::Location,
+ GENERIC => 1,
+ OBJ => '',
+ SOURCE => '$<',
+ COMPILE => '$(' . $compile .
')' ,
+ EXT => $test_suffix);
+ }
}
define_variable ('TEST_LOGS_TMP', '$(TEST_LOGS:.log=.log-t)',
INTERNAL);
diff --git a/configure.ac b/configure.ac
index 7073d6a..d7bf2fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ AC_CANONICAL_BUILD
AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
-AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests])
+AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests
parallel-tests])
# The API version is the base version. We must guarantee
# compatibility for all releases with the same API version.
diff --git a/doc/automake.texi b/doc/automake.texi
index 7a0bfdf..6ea02ed 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8371,6 +8371,7 @@ by the tests, not the tests themselves. Of course you
can set
@section Simple tests using @samp{parallel-tests}
@cindex @option{parallel-tests}, Using
+
The option @option{parallel-tests} (@pxref{Options}) enables a test
suite driver that is mostly compatible to the simple test driver
described above, but provides a few more features and slightly different
@@ -8383,8 +8384,11 @@ for exceptional failures. Similar to the simple test
driver,
the @code{check_*} variables are honored, and the environment variable
@env{srcdir} is set during test execution.
+This test driver is still experimental and may undergo changes in order
+to satisfy additional portability requirements.
+
@vindex TEST_SUITE_LOG
address@hidden TEST_LOGS
address@hidden TESTS
The driver operates by defining a set of @command{make} rules to create
a summary log file, @code{TEST_SUITE_LOG}, which defaults to
@file{test-suite.log} and requires a @file{.log} suffix. This file
@@ -8393,6 +8397,7 @@ depends upon log files created for each single test
program listed in
corresponding tests.
@vindex TEST_EXTENSIONS
address@hidden TEST_LOGS
Each log file is created when the corresponding test has completed.
The set of log files is listed in the read-only variable
@code{TEST_LOGS}, and defaults to @code{TESTS}, with the executable
@@ -8401,6 +8406,34 @@ extension if any (@pxref{EXEEXT}), as well as any suffix
listed in
@code{TEST_EXTENSIONS} defaults to @file{.test}. Results are undefined
if a test file name ends in several concatenated suffixes.
address@hidden _LOG_COMPILER
address@hidden _LOG_FLAGS
address@hidden @var{EXT}_LOG_COMPILE
address@hidden @var{EXT}_LOG_COMPILER
address@hidden @var{EXT}_LOG_FLAGS
address@hidden address@hidden
+For tests that match an extension @address@hidden listed in
address@hidden, you can provide a test driver using the variable
address@hidden@var{ext}_LOG_COMPILER} (note the upper-case extension) and pass
+options in @address@hidden and allow the user to pass
+options in @address@hidden It will cause all tests with
+this extension to be called with this driver. For example,
+
address@hidden
+TESTS = foo.pl bar.py
+TEST_EXTENSIONS = .pl .py
+PL_LOG_COMPILER = $(PERL)
+PL_LOG_FLAGS = -w
+PY_LOG_COMPILER = $(PYTHON)
+PY_LOG_FLAGS = -v
address@hidden example
+
address@hidden
+will invoke @samp{$(PERL) -w foo.pl} and @samp{$(PYTHON) -v bar.py} to
+produce @file{foo.log} and @file{bar.log}, respectively. The
address@hidden variable is still expanded before the driver,
+but should be reserved for the user.
+
@vindex VERBOSE
As with the simple driver above, by default one status line is printed
per completed test, and a short summary after the suite has completed.
@@ -8436,12 +8469,55 @@ Tests can exit with an exit status of 99 to signal such
a @emph{hard
error}. Unless the variable @code{DISABLE_HARD_ERRORS} is set to a
nonempty value, such tests will be counted as failed.
address@hidden LAZY_TEST_SUITE
-By default, all tests listed in @code{TESTS} are run upon @code{make
-check}. When @code{LAZY_TEST_SUITE} is nonempty, then log files of
-a previous run are not removed before starting the test suite, so only
-tests that have not yet been completed are run, as well as tests that
-have been modified after the previous run.
+By default, the test suite driver will run all tests, but there are
+several ways to limit the set of tests that are run:
+
address@hidden @bullet
address@hidden
+You can set the @code{TESTS} variable, similarly to how you can with
+the simple test driver from the previous section. For example, you can
+use a command like this to run only a subset of the tests:
+
address@hidden
+env TESTS="foo.test bar.test" make -e check
address@hidden example
+
address@hidden
+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
+described above. For example, you can use the following:
+
address@hidden
+set x subset*.log; shift
+env TEST_LOGS="foo.log $*" make -e check
address@hidden example
+
address@hidden
address@hidden RECHECK_LOGS
address@hidden lazy test execution
+By default, the test driver removes all old per-test log files before it
+starts running tests to regenerate them. The variable
address@hidden contains the set of log files which are removed.
address@hidden defaults to @code{TEST_LOGS}, which means all tests
+need to be rechecked. By overriding this variable, you can choose which
+tests need to be reconsidered. For example, you can lazily rerun only
+those tests which are outdated, i.e., older than their prerequisite test
+files, by setting this variable to the empty value:
+
address@hidden
+env RECHECK_LOGS= make -e check
address@hidden example
+
address@hidden
address@hidden recheck
address@hidden recheck-html
+You can ensure that all tests are rerun which have failed or passed
+unexpectedly, by running @code{make recheck} in the test directory.
+This convenience target will set @code{RECHECK_LOGS} appropriately
+before invoking the main test driver. The @code{recheck-html} target
+does the same as @code{recheck} but again converts the resulting log
+file in HTML format, like the @code{check-html} target.
address@hidden itemize
In order to guarantee an ordering between tests even with @code{make
address@hidden, dependencies between the corresponding log files may be
@@ -8476,6 +8552,17 @@ the inference rules generated by @command{automake} can
apply. For
literal test names, @command{automake} can generate per-target rules
to avoid this limitation.
+Please note that it is currently not possible to use @code{$(srcdir)/}
+or @code{$(top_srcdir)/} in the @code{TESTS} variable. This technical
+limitation is necessary to avoid generating test logs in the source tree
+and has the unfortunate consequence thast it is not possible to specify
+distributed tests that are themselves generated by means of explicit
+rules, in a way that is portable to all @command{make} implementations
+(@pxref{Make Target Lookup,,, autoconf, The Autoconf Manual}, the
+semantics of FreeBSD and OpenBSD @command{make} conflict with this).
+In case of doubt you may want to require to use GNU @command{make},
+or work around the issue with inference rules to generate the tests.
+
@section DejaGnu Tests
diff --git a/lib/Automake/tests/.gitignore b/lib/Automake/tests/.gitignore
new file mode 100644
index 0000000..ffbdfaf
--- /dev/null
+++ b/lib/Automake/tests/.gitignore
@@ -0,0 +1,2 @@
+*.log
+*.log-t
diff --git a/lib/Automake/tests/Makefile.am b/lib/Automake/tests/Makefile.am
index acd769f..ad5d45e 100644
--- a/lib/Automake/tests/Makefile.am
+++ b/lib/Automake/tests/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to create Makefile.in
-## Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc.
+## Copyright (C) 2002, 2003, 2008, 2009 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
@@ -15,7 +15,10 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-TESTS_ENVIRONMENT = $(PERL) -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+PL_LOG_COMPILER = $(PERL)
+PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+TEST_EXTENSIONS = .pl
+
TESTS = \
Condition.pl \
Condition-t.pl \
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index b663fc4..a93a60a 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -65,6 +65,71 @@ test "X$(AM_COLOR_TESTS)" != Xno \
blu='[1;34m'; \
std='[m'; \
}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+# Restructured Text title and section.
+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; \
+}'
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log, and passes
+# TESTS_ENVIRONMENT. Save and restore TERM around use of
+# TESTS_ENVIRONMENT, in case that unsets it.
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+srcdir=$(srcdir); export srcdir; \
+rm -f address@hidden; \
+trap 'st=$$?; rm -f '\''$(abs_builddir)/address@hidden'\''; (exit $$st); exit
$$st' \
+ 1 2 13 15; \
+am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
+test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \
+$(TESTS_ENVIRONMENT)
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+am__test_logs1 = $(TESTS:=.log)
+TEST_LOGS = $(am__test_logs1:.pl.log=.log)
+PL_LOG_COMPILE = $(PL_LOG_COMPILER) $(AM_PL_LOG_FLAGS) $(PL_LOG_FLAGS)
+TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -154,7 +219,9 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-TESTS_ENVIRONMENT = $(PERL) -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+PL_LOG_COMPILER = $(PERL)
+PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+TEST_EXTENSIONS = .pl
TESTS = \
Condition.pl \
Condition-t.pl \
@@ -167,6 +234,7 @@ EXTRA_DIST = $(TESTS)
all: all-am
.SUFFIXES:
+.SUFFIXES: .html .log .pl
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -204,97 +272,159 @@ ctags: CTAGS
CTAGS:
-check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
- srcdir=$(srcdir); export srcdir; \
- list=' $(TESTS) '; \
- $(am__tty_colors); \
- if test -n "$$list"; then \
- for tst in $$list; do \
- if test -f ./$$tst; then dir=./; \
- elif test -f $$tst; then dir=; \
- else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xpass=`expr $$xpass + 1`; \
- failed=`expr $$failed + 1`; \
- col=$$red; res=XPASS; \
- ;; \
- *) \
- col=$$grn; res=PASS; \
- ;; \
- esac; \
- elif test $$? -ne 77; then \
- all=`expr $$all + 1`; \
- case " $(XFAIL_TESTS) " in \
- *[\ \ ]$$tst[\ \ ]*) \
- xfail=`expr $$xfail + 1`; \
- col=$$lgn; res=XFAIL; \
- ;; \
- *) \
- failed=`expr $$failed + 1`; \
- col=$$red; res=FAIL; \
- ;; \
- esac; \
- else \
- skip=`expr $$skip + 1`; \
- col=$$blu; res=SKIP; \
- fi; \
- echo "$${col}$$res$${std}: $$tst"; \
- done; \
- if test "$$all" -eq 1; then \
- tests="test"; \
- All=""; \
- else \
- tests="tests"; \
- All="All "; \
- fi; \
- if test "$$failed" -eq 0; then \
- if test "$$xfail" -eq 0; then \
- banner="$$All$$all $$tests passed"; \
- else \
- if test "$$xfail" -eq 1; then failures=failure; else
failures=failures; fi; \
- banner="$$All$$all $$tests behaved as expected ($$xfail expected
$$failures)"; \
- fi; \
- else \
- if test "$$xpass" -eq 0; then \
- banner="$$failed of $$all $$tests failed"; \
- else \
- if test "$$xpass" -eq 1; then passes=pass; else passes=passes;
fi; \
- banner="$$failed of $$all $$tests did not behave as expected
($$xpass unexpected $$passes)"; \
- fi; \
- fi; \
- dashes="$$banner"; \
- skipped=""; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- skipped="($$skip test was not run)"; \
- else \
- skipped="($$skip tests were not run)"; \
- fi; \
- test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$skipped"; \
- fi; \
- report=""; \
- if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
- report="Please report to $(PACKAGE_BUGREPORT)"; \
- test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
- dashes="$$report"; \
- fi; \
- dashes=`echo "$$dashes" | sed s/./=/g`; \
- if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
- else \
- echo "$$red$$dashes"; \
- fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
- test "$$failed" -eq 0; \
- else :; fi
+# To be appended to the command running the test. Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>address@hidden 2>&1; \
+estatus=$$?; \
+if test -n '$(DISABLE_HARD_ERRORS)' \
+ && test $$estatus -eq 99; then \
+ estatus=1; \
+fi; \
+TERM=$$__SAVED_TERM; export TERM; \
+$(am__tty_colors); \
+xfailed=PASS; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ xfailed=XFAIL;; \
+esac; \
+case $$estatus:$$xfailed in \
+ 0:XFAIL) col=$$red; res=XPASS;; \
+ 0:*) col=$$grn; res=PASS ;; \
+ 77:*) col=$$blu; res=SKIP ;; \
+ 99:*) col=$$red; res=FAIL ;; \
+ *:XFAIL) col=$$lgn; res=XFAIL;; \
+ *:*) col=$$red; res=FAIL ;; \
+esac; \
+echo "$${col}$$res$${std}: $$f"; \
+echo "$$res: $$f (exit: $$estatus)" | \
+ $(am__rst_section) >$@; \
+cat address@hidden >>$@; \
+rm -f address@hidden
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__sh_e_setup); \
+ list='$(TEST_LOGS)'; \
+ results=`for f in $$list; do \
+ read line < $$f && echo "$$line" || echo FAIL; \
+ done`; \
+ all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[
]*//'`; \
+ fail=`echo "$$results" | grep -c '^FAIL'`; \
+ pass=`echo "$$results" | grep -c '^PASS'`; \
+ skip=`echo "$$results" | grep -c '^SKIP'`; \
+ xfail=`echo "$$results" | grep -c '^XFAIL'`; \
+ xpass=`echo "$$results" | grep -c '^XPASS'`; \
+ failures=`expr $$fail + $$xpass`; \
+ all=`expr $$all - $$skip`; \
+ if test "$$all" -eq 1; then tests=test; All=; \
+ else tests=tests; All="All "; fi; \
+ case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \
+ fail=0:xpass=0:xfail=0) \
+ msg="$$All$$all $$tests passed. "; \
+ exit=true;; \
+ fail=0:xpass=0:xfail=*) \
+ msg="$$All$$all $$tests behaved as expected"; \
+ if test "$$xfail" -eq 1; then xfailures=failure; \
+ else xfailures=failures; fi; \
+ msg="$$msg ($$xfail expected $$xfailures). "; \
+ exit=true;; \
+ fail=*:xpass=0:xfail=*) \
+ msg="$$fail of $$all $$tests failed. "; \
+ exit=false;; \
+ fail=*:xpass=*:xfail=*) \
+ msg="$$failures of $$all $$tests did not behave as expected"; \
+ if test "$$xpass" -eq 1; then xpasses=pass; \
+ else xpasses=passes; fi; \
+ msg="$$msg ($$xpass unexpected $$xpasses). "; \
+ exit=false;; \
+ *) \
+ echo >&2 "incorrect case"; exit 4;;
\
+ esac; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ msg="$$msg($$skip test was not run). "; \
+ else \
+ msg="$$msg($$skip tests were not run). "; \
+ fi; \
+ fi; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ echo "$$msg"; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for f in $$list; do \
+ read line < $$f; \
+ case $$line in \
+ PASS:*|XFAIL:*);; \
+ *) echo; cat $$f;; \
+ esac; \
+ done; \
+ } >$(TEST_SUITE_LOG).tmp; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if test "$$failures" -ne 0; then \
+ msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \
+ fi; \
+ fi; \
+ $(am__tty_colors); \
+ if $$exit; then \
+ echo $(ECHO_N) "$$grn$(ECHO_C)"; \
+ else \
+ echo $(ECHO_N) "$$red$(ECHO_C)"; \
+ fi; \
+ echo "$$msg" | $(am__text_box); \
+ echo $(ECHO_N) "$$std$(ECHO_C)"; \
+ test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
+ $$exit
+
+# Run all the tests.
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set_logs=; if test "X$(TEST_LOGS)" = X.log; then \
+ set_logs=TEST_LOGS=; \
+ fi; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
+recheck-TESTS:
+ @list='$(TEST_LOGS)'; \
+ logs=`for f in $$list; do \
+ if read line < $$f; then \
+ case $$line in FAIL*|XPASS*) echo $$f;; esac; \
+ else echo $$f; fi; \
+ done | tr '\012\015' ' '`; \
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
+
+recheck-am: recheck-TESTS
+recheck: recheck-am
+
+.log.html:
+ @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \
+ for r2h in $$list; do \
+ if ($$r2h --version) >/dev/null 2>&1; then \
+ R2H=$$r2h; \
+ fi; \
+ done; \
+ if test -z "$$R2H"; then \
+ echo >&2 "cannot find rst2html, cannot create $@"; \
+ exit 2; \
+ fi; \
+ $$R2H $< >address@hidden
+ @mv address@hidden $@
+
+# Be sure to run check-TESTS first, and then to convert the result.
+# Beware of concurrent executions. And expect check-TESTS to fail.
+check-html recheck-html:
+ @target=`echo $@ | sed 's/-html$$//'`; \
+ if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then \
+ rv=0; else rv=$$?; \
+ fi; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \
+ exit $$rv
+.pl.log:
+ @p='$<'; $(am__check_pre) $(PL_LOG_COMPILE) "$$tst" $(am__check_post)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -342,6 +472,10 @@ install-strip:
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
+ -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
@@ -418,18 +552,20 @@ ps-am:
uninstall-am:
-.MAKE: check-am install-am install-strip
-
-.PHONY: all all-am check check-TESTS check-am clean clean-generic \
- distclean distclean-generic distdir dvi dvi-am html html-am \
- info info-am install install-am install-data install-data-am \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
- uninstall-am
+.MAKE: check-am check-html install-am install-strip recheck-am \
+ recheck-html
+
+.PHONY: all all-am check check-TESTS check-am check-html clean \
+ clean-generic distclean distclean-generic distdir dvi dvi-am \
+ html html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \
+ uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/lib/am/check.am b/lib/am/check.am
index 28af2ee..a83f149 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -52,7 +52,7 @@ include inst-vars.am
## It provides special support for "unit tests", that is to say,
## tests that (once run) no longer need to be re-compiled and
## re-run at each "make check", unless their sources changed. To
-## enable unit-test supports, define LAZY_TEST_SUITE. In such a
+## enable unit-test supports, set RECHECK_LOGS to empty. In such a
## setting, that heavily relies on correct dependencies, its users may
## prefer to define EXTRA_PROGRAMS instead of check_PROGRAMS, because
## it allows intertwined compilation and execution of the tests.
@@ -202,9 +202,6 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
done; \
} >$(TEST_SUITE_LOG).tmp; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
- if test -n '$(LAZY_TEST_SUITE)'; then \
- msg="$${msg}(tests were rerun lazily). "; \
- fi; \
if test "$$failures" -ne 0; then \
msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \
if test -n "$(PACKAGE_BUGREPORT)"; then \
@@ -222,13 +219,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
$$exit
+RECHECK_LOGS = $(TEST_LOGS)
+
# Run all the tests.
check-TESTS:
-## Expand $(TEST_LOGS) only once, to avoid exceeding line length limits.
- @list='$(TEST_LOGS)'; if test -z '$(LAZY_TEST_SUITE)' \
- && test -n "$$list"; then \
- rm -f $$list; \
- fi
+## Expand $(RECHECK_LOGS) only once, to avoid exceeding line length limits.
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
## in any case even in lazy mode: otherwise, if no test needs rerunning,
## or a prior run plus reruns all happen within the same timestamp
@@ -242,8 +238,22 @@ check-TESTS:
set_logs=TEST_LOGS=; \
fi; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
-.MAKE: check-TESTS
+## Rerun all FAILed or XPASSed tests (as well as all whose logs are out
+## of date or do not exist).
+recheck-TESTS:
+ @list='$(TEST_LOGS)'; \
+ logs=`for f in $$list; do \
+ if read line < $$f; then \
+ case $$line in FAIL*|XPASS*) echo $$f;; esac; \
+ else echo $$f; fi; \
+ done | tr '\012\015' ' '`; \
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
+
+recheck-am: recheck-TESTS
+recheck: recheck-am
+.PHONY: recheck recheck-am recheck-TESTS
+.MAKE: recheck-am
## -------------- ##
## Produce HTML. ##
@@ -265,14 +275,15 @@ check-TESTS:
# Be sure to run check-TESTS first, and then to convert the result.
# Beware of concurrent executions. And expect check-TESTS to fail.
-check-html:
- @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then :; else \
- rv=$$?; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML); \
- exit $$rv; \
- fi
-.PHONY: check-html
-.MAKE: check-html
+check-html recheck-html:
+ @target=`echo $@ | sed 's/-html$$//'`; \
+ if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then \
+ rv=0; else rv=$$?; \
+ fi; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \
+ exit $$rv
+.PHONY: check-html recheck-html
+.MAKE: check-html recheck-html
else !%?PARALLEL_TESTS%
diff --git a/lib/am/check2.am b/lib/am/check2.am
index 58ca9e6..237e20a 100644
--- a/lib/am/check2.am
+++ b/lib/am/check2.am
@@ -17,4 +17,4 @@
## From a test file to a log file.
?GENERIC?%EXT%.log:
?!GENERIC?%OBJ%: %SOURCE%
- @p='%SOURCE%'; $(am__check_pre) "$$tst" $(am__check_post)
+ @p='%SOURCE%'; $(am__check_pre) %COMPILE% "$$tst" $(am__check_post)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e0b7f23..1b293cb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,4 @@
## Process this file with automake to create Makefile.in
-AUTOMAKE_OPTIONS = parallel-tests
XFAIL_TESTS = \
all.test \
@@ -486,6 +485,9 @@ parallel-tests3.test \
parallel-tests4.test \
parallel-tests5.test \
parallel-tests6.test \
+parallel-tests7.test \
+parallel-tests8.test \
+parallel-tests9.test \
parse.test \
percent.test \
percent2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index ff8ed79..48e828c 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -125,11 +125,14 @@ elif test -f "$$f"; then dir=;
\
else dir="$(srcdir)/"; fi; \
tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \
$(TESTS_ENVIRONMENT)
+RECHECK_LOGS = $(TEST_LOGS)
TEST_SUITE_LOG = test-suite.log
TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
TEST_EXTENSIONS = .test
am__test_logs1 = $(TESTS:=.log)
TEST_LOGS = $(am__test_logs1:.test.log=.log)
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
@@ -220,7 +223,6 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = parallel-tests
XFAIL_TESTS = \
all.test \
auxdir2.test \
@@ -714,6 +716,9 @@ parallel-tests3.test \
parallel-tests4.test \
parallel-tests5.test \
parallel-tests6.test \
+parallel-tests7.test \
+parallel-tests8.test \
+parallel-tests9.test \
parse.test \
percent.test \
percent2.test \
@@ -1071,9 +1076,6 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
done; \
} >$(TEST_SUITE_LOG).tmp; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
- if test -n '$(LAZY_TEST_SUITE)'; then \
- msg="$${msg}(tests were rerun lazily). "; \
- fi; \
if test "$$failures" -ne 0; then \
msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \
if test -n "$(PACKAGE_BUGREPORT)"; then \
@@ -1093,15 +1095,23 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
# Run all the tests.
check-TESTS:
- @list='$(TEST_LOGS)'; if test -z '$(LAZY_TEST_SUITE)' \
- && test -n "$$list"; then \
- rm -f $$list; \
- fi
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set_logs=; if test "X$(TEST_LOGS)" = X.log; then \
set_logs=TEST_LOGS=; \
fi; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
+recheck-TESTS:
+ @list='$(TEST_LOGS)'; \
+ logs=`for f in $$list; do \
+ if read line < $$f; then \
+ case $$line in FAIL*|XPASS*) echo $$f;; esac; \
+ else echo $$f; fi; \
+ done | tr '\012\015' ' '`; \
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
+
+recheck-am: recheck-TESTS
+recheck: recheck-am
.log.html:
@list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \
@@ -1119,14 +1129,15 @@ check-TESTS:
# Be sure to run check-TESTS first, and then to convert the result.
# Beware of concurrent executions. And expect check-TESTS to fail.
-check-html:
- @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then :; else \
- rv=$$?; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML); \
- exit $$rv; \
- fi
+check-html recheck-html:
+ @target=`echo $@ | sed 's/-html$$//'`; \
+ if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then \
+ rv=0; else rv=$$?; \
+ fi; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \
+ exit $$rv
.test.log:
- @p='$<'; $(am__check_pre) "$$tst" $(am__check_post)
+ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1256,7 +1267,8 @@ ps-am:
uninstall-am:
-.MAKE: check-TESTS check-am check-html install-am install-strip
+.MAKE: check-am check-html install-am install-strip recheck-am \
+ recheck-html
.PHONY: all all-am check check-TESTS check-am check-html clean \
clean-generic clean-local distclean distclean-generic distdir \
@@ -1267,7 +1279,8 @@ uninstall-am:
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am uninstall uninstall-am
+ pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \
+ uninstall uninstall-am
$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
diff --git a/tests/defs.in b/tests/defs.in
index 3b8fe96..6f2babe 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -299,7 +299,7 @@ unset DESTDIR
# need to control (and test for) in some of the tests to ensure
# backward-compatible behavior.
unset DISABLE_HARD_ERRORS
-unset LAZY_TEST_SUITE
+unset RECHECK_LOGS
unset VERBOSE
echo "=== Running test $0"
diff --git a/tests/parallel-tests.test b/tests/parallel-tests.test
index e7ebd3d..056ab2f 100755
--- a/tests/parallel-tests.test
+++ b/tests/parallel-tests.test
@@ -20,7 +20,7 @@
# - TEST_SUITE_LOG
# - dependencies between tests
# - DISABLE_HARD_ERRORS
-# - LAZY_TEST_SUITE
+# - RECHECK_LOGS
. ./defs-p || Exit 1
@@ -108,24 +108,31 @@ test -f mylog.log
# Note that the previous test and this one taken together expose the timing
# issue that requires the check-TESTS rule to always remove TEST_SUITE_LOG
# before running the tests lazily.
-env LAZY_TEST_SUITE=yes $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
cat stdout
test -f foo.log
grep foo.test stdout
grep bar.test stdout && Exit 1
grep baz.test stdout && Exit 1
grep '2.*tests.*failed' stdout
-grep 'lazily' stdout
# Now, explicitly retry with all test logs already updated, and ensure
# that the summary is still displayed.
-env LAZY_TEST_SUITE=yes $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
cat stdout
grep foo.test stdout && Exit 1
grep bar.test stdout && Exit 1
grep baz.test stdout && Exit 1
grep '2.*tests.*failed' stdout
+# Lazily rerunning only foo should only rerun this one test.
+env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; Exit 1; }
+cat stdout
+grep foo.test stdout
+grep bar.test stdout && Exit 1
+grep baz.test stdout && Exit 1
+grep '2.*tests.*failed' stdout
+
# Test VERBOSE.
env VERBOSE=yes $MAKE -e check > stdout && { cat stdout; Exit 1; }
cat stdout
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index 17a5108..f9e2a3c 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -16,6 +16,7 @@
# Check parallel-tests features:
# - check-html
+# - recheck-html
required=rst2html
. ./defs-p || Exit 1
@@ -56,4 +57,16 @@ $AUTOMAKE -a
$MAKE check-html >stdout && { cat stdout; Exit 1; }
cat stdout
test -f mylog.html
+
+# Always create the HTML output, even if there were no failures.
+rm -f mylog.html
+env TESTS=foo.test $MAKE -e check-html >stdout || { cat stdout; Exit 1; }
+cat stdout
+test -f mylog.html
+
+# Create HTML output also with recheck-html
+rm -f mylog.html
+env TESTS=foo.test $MAKE -e recheck-html >stdout || { cat stdout; Exit 1; }
+cat stdout
+test -f mylog.html
:
diff --git a/tests/parallel-tests4.test b/tests/parallel-tests7.test
similarity index 73%
copy from tests/parallel-tests4.test
copy to tests/parallel-tests7.test
index ca3e18b..6bdaaff 100755
--- a/tests/parallel-tests4.test
+++ b/tests/parallel-tests7.test
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check parallel-tests features:
-# - suffix rules
+# - per-extension test drivers
. ./defs-p || Exit 1
set -e
@@ -31,10 +31,27 @@ cat > Makefile.am << 'END'
TESTS = foo.chk bar.test $(check_PROGRAMS) sub/test
check_PROGRAMS = baz bla.test bli.suff
TEST_EXTENSIONS = .chk .test
+CHK_LOG_COMPILER = ./chk-driver
+TEST_LOG_COMPILER = ./test-driver
+AM_CHK_LOG_FLAGS = 1
+CHK_LOG_FLAGS = 2
+AM_TEST_LOG_FLAGS = 3
+TEST_LOG_FLAGS = 4
END
mkdir sub
+cat >chk-driver <<'END'
+#! /bin/sh
+echo $0 "$@"
+shift
+shift
+exec "$@"
+exit 127
+END
+chmod a+x chk-driver
+cp chk-driver test-driver
+
cat >foo.chk << 'END'
#! /bin/sh
exit 0
@@ -61,10 +78,13 @@ unset TESTS || :
./configure
$MAKE
$MAKE check
-test -f foo.log
-test -f bar.log
+grep 'chk-driver *1 *2' foo.log
+grep 'test-driver *3 *4' bar.log
test -f baz.log
-test -f bla.log
+grep driver baz.log && Exit 1
+grep 'test-driver *3 *4' bla.log
test -f bli.suff.log
+grep driver bli.suff.log && Exit 1
test -f sub/test.log
+grep driver sub/test.log && Exit 1
:
diff --git a/tests/parallel-tests5.test b/tests/parallel-tests8.test
similarity index 52%
copy from tests/parallel-tests5.test
copy to tests/parallel-tests8.test
index f109cc2..309a2cf 100755
--- a/tests/parallel-tests5.test
+++ b/tests/parallel-tests8.test
@@ -15,54 +15,61 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check parallel-tests features:
-# - concurrent program compilation and testing (with EXTRA_PROGRAMS)
-#
-# Actually, this test doesn't ensure that things happen concurrently.
-# It merely serves as demonstration. :-)
+# - generated distributed tests.
+# - listing $(srcdir)/ or $(top_srcdir)/ in TESTS doesn't work ATM,
+# and is thus diagnosed.
+
+# TODO: this test should also ensure that the `make' implementation
+# properly adheres to rules in all cases. See the Autoconf
+# manual for the ugliness in this area, when VPATH comes into
+# play. :-/
-required=GNUmake
. ./defs-p || Exit 1
set -e
cat >> configure.in << 'END'
-AC_PROG_CC
AC_OUTPUT
END
cat > Makefile.am << 'END'
-TESTS = $(programs) $(scripts)
-EXTRA_PROGRAMS = $(programs)
-CLEANFILES = $(EXTRA_PROGRAMS)
-dist_noinst_SCRIPTS = $(scripts)
-programs =
-scripts =
+TESTS = foo.test
+## the next line will cause automake to error out:
+TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
+.in.test:
+ cp $< $@
+ chmod +x $@
+check_SCRIPTS = $(TESTS)
+EXTRA_DIST = foo.in foo.test
+DISTCLEANFILES = foo.test
END
-for i in 1 2 3 4 5 6 7 8; do
- echo "scripts += foo$i.test" >> Makefile.am
- echo "programs += foo$i.prog" >> Makefile.am
- cat >foo$i.test <<'END'
+cat >>foo.in <<'END'
#! /bin/sh
echo "this is $0"
exit 0
END
- cat >foo$i.c <<'END'
-int main()
-{
- return 0;
-}
-END
- chmod a+x foo$i.test
-done
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a
+AUTOMAKE_fails -a
+grep '(srcdir.*bar' stderr
+grep 'top_srcdir.*baz' stderr
-unset TESTS || :
+sed '/srcdir/d' < Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE -a
./configure
-$MAKE -j4 check
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+mkdir build
+cd build
+../configure
+$MAKE check
+test ! -f ../foo.log
$MAKE distcheck
+
:
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests9.test
similarity index 75%
copy from tests/parallel-tests2.test
copy to tests/parallel-tests9.test
index 17a5108..7c935d9 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests9.test
@@ -15,9 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check parallel-tests features:
-# - check-html
+# - recheck
-required=rst2html
. ./defs-p || Exit 1
set -e
@@ -53,7 +52,19 @@ $AUTOCONF
$AUTOMAKE -a
./configure
-$MAKE check-html >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; Exit 1; }
cat stdout
-test -f mylog.html
+
+$MAKE recheck >stdout && { cat stdout; Exit 1; }
+cat stdout
+grep foo.test stdout && Exit 1
+grep bar.test stdout || Exit 1
+grep baz.test stdout || Exit 1
+
+# If we cannot read the log file, then redo it as well.
+chmod a-r foo.log
+$MAKE recheck >stdout && { cat stdout; Exit 1; }
+cat stdout
+grep foo.test stdout || Exit 1
+
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, ad-parallel-tests, updated. Release-1-10-292-g83b03f3,
Ralf Wildenhues <=