* Changes to Automake-generated testsuite harnesses:
+ - The new automake option 'serial-tests' has been introduced. It can
+ be used to explicitly instruct automake to use the older serial
+ testsuite harness. This is still the default at the moment, but it
+ might change in future versions.
+
- Test scripts that exit with status 99 to signal an "hard error" (e.g.,
and unexpected or internal error, or a failure to set up the test case
scenario) have their outcome reported as an 'ERROR' now. Previous
@node Serial Test Harness
@subsection Serial Test Harness
+@cindex @option{serial-tests}, Using
@emph{NOTE:} This harness, while still being the default one, is
-obsolescent, and kept mostly for backward-compatibility reasons.
-The user is advised to use the parallel test harness instead
-(@pxref{Parallel Test Harness}).
-
-The serial harness operates by simply running the tests serially, one at
-the time, without any I/O redirection. It's up to the user to implement
-logging of tests' output, if that's requited or desired.
+obsolescent, and kept mostly for backward-compatibility reasons. The user
+is advised to use the parallel test harness instead (@pxref{Parallel Test
+Harness}). Be warned that future Automake versions might switch to use
+that more modern and feature-rich harness by default.
+
+The serial test harness is enabled by the Automake option
+@option{serial-tests}. It operates by simply running the tests serially,
+one at the time, without any I/O redirection. It's up to the user to
+implement logging of tests' output, if that's requited or desired.
@c TODO: give an example of how this can be done.
For historical and implementation reasons, the @code{AM_TESTS_ENVIRONMENT}
Enable test suite harness for @code{TESTS} that can run tests in parallel
(@pxref{Parallel Test Harness}, for more information).
+@item @option{serial-tests}
+@cindex Option, @option{serial-tests}
+@opindex serial-tests
+Enable the older serial test suite harness for @code{TESTS} (@pxref{Serial
+Test Harness}, for more information). This is still the default for the
+moment.
+
@item @option{readme-alpha}
@cindex Option, @option{readme-alpha}
@opindex readme-alpha
error ($where, "support for lzma-compressed distribution " .
"archives has been removed");
}
+ elsif ($_ eq 'parallel-tests')
+ {
+ # Just recognize it explicitly.
+ }
+ elsif ($_ eq 'serial-tests')
+ {
+ # This is a little of an hack, but good enough for the moment.
+ delete $options->{'parallel-tests'};
+ }
elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
|| $_ eq 'dist-shar' || $_ eq 'dist-zip'
|| $_ eq 'dist-tarZ' || $_ eq 'dist-bzip2'
|| $_ eq 'subdir-objects' || $_ eq 'nostdinc'
|| $_ eq 'no-exeext' || $_ eq 'no-define'
|| $_ eq 'std-options'
- || $_ eq 'color-tests' || $_ eq 'parallel-tests'
+ || $_ eq 'color-tests'
|| $_ eq 'cygnus' || $_ eq 'no-dependencies')
{
# Explicitly recognize these.
parallel-am.test \
parallel-am2.test \
parallel-am3.test \
+serial-tests.test \
parallel-tests.test \
parallel-tests2.test \
parallel-tests3.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2012 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/>.
+
+# Option 'serial-tests'.
+
+# To avoid useless generation of a sibling test.
+am_parallel_tests=yes
+am_create_testdir=empty
+. ./defs || Exit 1
+
+hasnt_parallel_tests ()
+{
+ $EGREP 'TEST_SUITE_LOG|TEST_LOGS|\.log.*:' $1 && Exit 1
+ grep 'recheck.*:' $1 && Exit 1
+ grep '^check-TESTS: \$(TESTS)$' $1
+}
+
+has_parallel_tests ()
+{
+ $EGREP '(^| )check-TESTS.*:' $1
+ $EGREP '(^| )recheck.*:' $1
+ grep '^\$(TEST_SUITE_LOG): \$(TEST_LOGS)$' $1
+ grep '^\.test\.log:$' $1
+}
+
+mkdir one two
+
+cat >> one/configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([serial-tests])
+AC_CONFIG_FILES([Makefile])
+END
+
+echo 'TESTS = foo.test bar.test' > one/Makefile.am
+
+cat >> two/configure.ac <<END
+AC_INIT([$me], [2.0])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE([parallel-tests])
+AC_CONFIG_FILES([aMakefile bMakefile])
+END
+
+cp one/Makefile.am two/aMakefile.am
+cat - one/Makefile.am > two/bMakefile.am <<END
+AUTOMAKE_OPTIONS = serial-tests
+END
+
+cd one
+touch missing install-sh
+$ACLOCAL
+$AUTOMAKE
+grep TEST Makefile.in # For debugging.
+hasnt_parallel_tests Makefile.in
+test ! -r test-driver
+cd ..
+
+cd two
+mkdir config
+$ACLOCAL
+$AUTOMAKE --add-missing
+grep TEST [ab]Makefile.in # For debugging.
+has_parallel_tests aMakefile.in
+hasnt_parallel_tests bMakefile.in
+mv aMakefile.in aMakefile.sav
+mv bMakefile.in bMakefile.sav
+test ! -r test-driver
+test -f config/test-driver
+$AUTOMAKE
+diff aMakefile.sav aMakefile.in
+diff bMakefile.sav bMakefile.in
+cd ..
+
+: