]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'master' into ng/master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 18 May 2012 13:03:49 +0000 (15:03 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 18 May 2012 13:16:17 +0000 (15:16 +0200)
* master:
  tests: use 'parallel-tests' Automake option by default
  doc: fix location of Automake's own test-suite.log file
  yacc tests: avoid a spurious failure with Sun C++ 5.9
  self tests: cater for /bin/ksh symlinked to Zsh
  tests: fix spurious failures due to dpkg install-info

+ Non-trivial extra edits:

* t/check7.sh: look at the contents of '$am_serial_tests', not of
'$am_parallel_tests', to decide which kind of testsuite harness is
being used.
* t/parallel-tests-concatenated-suffix.sh: Don't explicitly set
'$am_parallel_tests' to "yes" anymore, is not required and would
cause a 'maintainer-check' failure.
* t/parallel-tests-dynamic.sh: Likewise.
* t/parallel-tests-longest-stem.sh: Likewise.
* t/parallel-tests-no-repeat.sh: Likewise.
* t/parallel-tests-per-suffix-deps.sh: Likewise.
* t/parallel-tests-srcdir-in-test-name.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
113 files changed:
1  2 
Makefile.am
defs
doc/automake-ng.texi
gen-testsuite-part
syntax-checks.mk
t/README
t/ax/tap-summary-aux.sh
t/ax/testsuite-summary-checks.sh
t/check-concurrency-bug9245.sh
t/check10.sh
t/check11.sh
t/check12.sh
t/check4.sh
t/check5.sh
t/check7.sh
t/check8.sh
t/color.sh
t/color2.sh
t/distcheck-pr10470.sh
t/exeext4.sh
t/java-compile-run-flat.sh
t/java-compile-run-nested.sh
t/make-dryrun.tap
t/maken3.sh
t/parallel-tests-concatenated-suffix.sh
t/parallel-tests-dynamic.sh
t/parallel-tests-empty-tests.sh
t/parallel-tests-exeext.sh
t/parallel-tests-exit-statuses.sh
t/parallel-tests-extra-programs.sh
t/parallel-tests-fd-redirect-exeext.sh
t/parallel-tests-fd-redirect.sh
t/parallel-tests-fork-bomb.sh
t/parallel-tests-harderror.sh
t/parallel-tests-log-compiler-1.sh
t/parallel-tests-log-override.sh
t/parallel-tests-logvars-example.sh
t/parallel-tests-longest-stem.sh
t/parallel-tests-many.sh
t/parallel-tests-no-color-in-log.sh
t/parallel-tests-no-repeat.sh
t/parallel-tests-per-suffix-deps.sh
t/parallel-tests-srcdir-in-test-name.sh
t/parallel-tests-unreadable.sh
t/parallel-tests.sh
t/parallel-tests2.sh
t/parallel-tests3.sh
t/parallel-tests5.sh
t/parallel-tests6.sh
t/parallel-tests8.sh
t/posixsubst-tests.sh
t/serial-tests.sh
t/tap-autonumber.sh
t/tap-bad-prog.tap
t/tap-bailout-leading-space.sh
t/tap-bailout-suppress-later-errors.sh
t/tap-bailout.sh
t/tap-basic.sh
t/tap-color.sh
t/tap-common-setup.sh
t/tap-deps.sh
t/tap-diagnostic-custom.sh
t/tap-diagnostic.sh
t/tap-doc.sh
t/tap-doc2.sh
t/tap-global-log.sh
t/tap-global-result.sh
t/tap-lazy-check.sh
t/tap-log.sh
t/tap-merge-stdout-stderr.sh
t/tap-more.sh
t/tap-msg0-bailout.sh
t/tap-msg0-planskip.sh
t/tap-out-of-order.sh
t/tap-passthrough-exit.sh
t/tap-passthrough.sh
t/tap-plan-corner.sh
t/tap-plan-leading-zero.sh
t/tap-plan-malformed.sh
t/tap-plan-middle.sh
t/tap-plan-whitespace.sh
t/tap-plan.sh
t/tap-planskip-and-logging.sh
t/tap-planskip-case-insensitive.sh
t/tap-planskip-late.sh
t/tap-planskip-unplanned-corner.sh
t/tap-planskip-whitespace.sh
t/tap-planskip.sh
t/tap-realtime.sh
t/tap-recheck.sh
t/tap-signal.tap
t/tap-test-number-0.sh
t/tap-todo-skip.sh
t/tap-unplanned.sh
t/test-driver-custom-multitest-recheck.sh
t/test-driver-custom-multitest-recheck2.sh
t/test-driver-custom-multitest.sh
t/test-driver-custom-no-extra-driver.sh
t/test-driver-custom-xfail-tests.sh
t/test-driver-fail.sh
t/test-driver-is-distributed.sh
t/test-driver-strip-vpath.sh
t/test-extensions.sh
t/test-log.sh
t/test-metadata-global-log.sh
t/test-metadata-global-result.sh
t/test-metadata-results.sh
t/test-missing.sh
t/test-trs-basic.sh
t/test-trs-recover-parallel.sh
t/test-trs-recover.sh
t/testsuite-summary-reference-log.sh
t/yacc-cxx.sh

diff --cc Makefile.am
Simple merge
diff --cc defs
Simple merge
index 57442c0b9fcb3b99d4b813ce5b95e19309f54fc1,5928291bb975e30ae73d57c9b99fcfa29fee817e..eb4705c24853c08566e951e332e45ca1ab397519
@@@ -12859,14 -12915,12 +12859,14 @@@ which can then be spent on fixing more 
  features.
  
  For a bug report, a feature request or other suggestions, please send
 -email to @email{@value{PACKAGE_BUGREPORT}}.  This will then open a new
 -bug in the @uref{http://debbugs.gnu.org/@/automake, bug tracker}.  Be
 -sure to include the versions of Autoconf and Automake that you use.
 +email to @email{@value{PACKAGE_BUGREPORT}}.
 +@c FIXME: we'll need a bug tracker for Automake-NG, sooner or later ...
 +@c This will then open a new bug in the
 +@c @uref{http://debbugs.gnu.org/@/automake, bug tracker}.
 +Be sure to include the versions of Autoconf and Automake-NG that you use.
  Ideally, post a minimal @file{Makefile.am} and @file{configure.ac} that
  reproduces the problem you encounter.  If you have encountered test
- suite failures, please attach the @file{tests/test-suite.log} file.
+ suite failures, please attach the @file{test-suite.log} file.
  
  @c ========================================================== Appendices
  
Simple merge
Simple merge
diff --cc t/README
index 8628f1e218836feea2604cc16a4d70e63dc9e2d0,5f967d271b0df3199ad64ef04b10302f61c57d03..ed39765a9805695b05b5dd1e84014ad2f9f64ec1
+++ b/t/README
    set-up of a test scenario, you can use the 'framework_fail_' function
    instead.
  
-   For tests that use the 'parallel-tests' Automake-NG option, set the
-   shell variable 'am_parallel_tests' to "yes" before including ./defs.
-   For tests that are *not* meant to work with the 'parallel-tests'
-   Automake-NG option (these should be very very few), set the shell
-   variable 'am_parallel_tests' to "no" before including ./defs.
+   For those tests checking the Automake-provided test harnesses that are
+   expected to work also when the 'serial-tests' Automake option is used
+   (thus causing the serial testsuite harness to be used in the generated
+   Makefile), place a line containing "try-with-serial-tests" somewhere
+   in the file.  That will ensure that the 'gen-testsuite-part' script
+   generates a sibling of that test which uses the serial harness instead
+   of the parallel one.  For those tests that are *not* meant to work with
+   the parallel testsuite harness at all (these should be very very few),
+   set the shell variable 'am_serial_tests' to "yes" before including
+   ./defs.
  
 -  Some tests in the Automake testsuite are auto-generated; those tests
 +  Some tests in the Automake-NG testsuite are auto-generated; those tests
    might have custom extensions, but their basename (that is, with such
    extension stripped) is expected to end with "-w" string, optionally
    followed by decimal digits.  For example, the name of a valid
Simple merge
Simple merge
index 87fcadecef04aaa100b050830e5d40877cbe1a68,1cb84223769d0f1f15c36021a043d585854ed074..177806a7f071bd2fdb43b131cb0672fa3a1b70ab
@@@ -44,18 -42,17 +44,14 @@@ $AUTOMAKE -
  
  ./configure
  
 -# Some make implementations don't grok the '-j' option.
 -$MAKE -j1 || Exit 77
 -
  for j in '' -j1 -j2; do
    $MAKE $j check && Exit 1
 -  TESTS=foo.test $MAKE $j -e check && Exit 1
 +  $MAKE $j TESTS=foo.test check && Exit 1
-   if test x"$am_parallel_tests" = x"yes"; then
-     $MAKE $j recheck && Exit 1
-     $MAKE $j TESTS=foo check && Exit 1
-     rm -f test-suite.log
-     $MAKE $j test-suite.log && Exit 1
-     test -f test-suite.log || Exit 1
-   else
-     : # For shells with buggy 'set -e'.
-   fi
+   $MAKE $j recheck && Exit 1
 -  TEST_LOGS=foo.log $MAKE $j -e check && Exit 1
++  $MAKE $j TESTS=foo check && Exit 1
+   rm -f test-suite.log
+   $MAKE $j test-suite.log && Exit 1
+   test -f test-suite.log || Exit 1
  done
  
  :
diff --cc t/check10.sh
Simple merge
diff --cc t/check11.sh
index 79a040ad2639594faa5042312230c97cc809bf9c,fc1209c61d9974f0c9f370bb7799b903828325fc..9d56a7c028a743a491c5eee4f4661e9be0cd82f6
@@@ -39,22 -40,22 +40,22 @@@ $AUTOMAKE -
  
  ./configure
  
 -env TESTS=skip $MAKE -e check >stdout || { cat stdout; Exit 1; }
 +$MAKE check TESTS=skip >stdout || { cat stdout; Exit 1; }
  cat stdout
- if test x"$am_parallel_tests" = x"yes"; then
-   count_test_results total=1 pass=0 fail=0 skip=1 xfail=0 xpass=0 error=0
- else
+ if test x"$am_serial_tests" = x"yes"; then
    grep '1.*passed' stdout && Exit 1
    : For shells with buggy 'set -e'.
+ else
+   count_test_results total=1 pass=0 fail=0 skip=1 xfail=0 xpass=0 error=0
  fi
  
 -env TESTS="skip skip2" $MAKE -e check >stdout || { cat stdout; Exit 1; }
 +$MAKE check TESTS="skip skip2" >stdout || { cat stdout; Exit 1; }
  cat stdout
- if test x"$am_parallel_tests" = x"yes"; then
-   count_test_results total=2 pass=0 fail=0 skip=2 xfail=0 xpass=0 error=0
- else
+ if test x"$am_serial_tests" = x"yes"; then
    grep '2.*passed' stdout && Exit 1
    : For shells with buggy 'set -e'.
+ else
+   count_test_results total=2 pass=0 fail=0 skip=2 xfail=0 xpass=0 error=0
  fi
  
  :
diff --cc t/check12.sh
Simple merge
diff --cc t/check4.sh
Simple merge
diff --cc t/check5.sh
Simple merge
diff --cc t/check7.sh
index 962cbe082312970d865127ed4c9f88478e0e5ff3,54d2b2bd31071da98d3c2318043df7d3f3ea5d38..5e4cafb38f1d36d43c443862c1eff20ebc3fb390
@@@ -59,12 -60,9 +60,12 @@@ $AUTOMAKE -
  
  ./configure
  $MAKE check
 -EXEEXT=.bin $MAKE -e print-xfail-tests >stdout || {  cat stdout; Exit 1; }
 -cat stdout
 -$FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
 +
- if test x"$am_parallel_tests" != x"yes"; then
++if test x"$am_serial_tests" = x"yes"; then
 +  $MAKE EXEEXT=.bin print-xfail-tests >stdout || { cat stdout; Exit 1; }
 +  cat stdout
 +  $FGREP 'BEG: a.bin b c.bin d.bin :END' stdout
 +fi
  
  $MAKE distcheck
  
diff --cc t/check8.sh
Simple merge
diff --cc t/color.sh
Simple merge
diff --cc t/color2.sh
Simple merge
Simple merge
diff --cc t/exeext4.sh
index 53c37dfe6f759d7aad6df8d00fdf07c47347a2c5,d9099b6097d3cbb1c749bc5ddd6e2b8d55255416..a8595e3342a3b8f4ad743920b159a7f6bd64a369
@@@ -17,7 -17,7 +17,7 @@@
  # Make sure $(EXEEXT) is appended to programs and to tests that are
  # programs, but not to @substitutions@.
  
- am_parallel_tests=no
 -# For gen-testsuite-part: ==> try-with-serial-tests <==
++am_serial_tests=yes
  . ./defs || Exit 1
  
  cat >> configure.ac << 'END'
Simple merge
Simple merge
Simple merge
diff --cc t/maken3.sh
index f0d836f82b4020b2e694a56bae9db2784dda5414,832bdcf59b672dd25371971695bf04e298184d11..5f9981e4a1e76e54db6fd8d38e84ebdb0a284325
  # This test exercises the GCS-mandated targets (except for dist)
  # as well as tags, TAGS.
  
+ # For gen-testsuite-part: ==> try-with-serial-tests <==
  . ./defs || Exit 1
  
 -# Does $MAKE support the '.MAKE' special target?
 -have_dotmake=false
 -if using_gmake; then
 -  have_dotmake=: # GNU make must support it.
 -else
 -  unindent > mk.tmp << 'END'
 -    targ.tmp:
 -      : > $@
 -    .MAKE: targ.tmp
 -END
 -  if $MAKE -n -f mk.tmp targ.tmp && test -f targ.tmp; then
 -    have_dotmake=:
 -  fi
 -fi
 -
  mkdir sub sub2
  
  cat >> configure.ac << 'END'
index 0791222264881f9f66ce961a6b76bcc131d5ad9e,0000000000000000000000000000000000000000..11e3f0222cf9bd2dfa39b25526b89e53e8291dcb
mode 100755,000000..100755
--- /dev/null
@@@ -1,76 -1,0 +1,75 @@@
- am_parallel_tests=yes
 +#! /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/>.
 +
 +# The parallel-tests driver should be able to cope with test scripts
 +# whose names end with several concatenated suffixes.
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.ac << 'END'
 +AC_OUTPUT
 +END
 +
 +tests='foo.sh foo.t.sh foo.sh.t foo.x.x foo.x.t.sh foo.t.x.sh foo.sh.t.x'
 +
 +for t in $tests; do
 +  (echo '#!/bin/sh' && echo 'echo == /$0 ==') > $t
 +  chmod a+x $t
 +done
 +
 +cat > Makefile.am <<END
 +TEST_EXTENSIONS = .t .sh .x
 +TESTS = $tests
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +for j in '' -j4; do
 +
 +  # Use append mode here to avoid dropping output.  See automake bug#11413.
 +  # Also, use 'echo' here to "nullify" the previous contents of 'stdout',
 +  # since Solaris 10 /bin/sh would try to optimize a ':' away after the
 +  # first iteration, even if it is redirected.
 +  echo " " >stdout
 +  $MAKE $j check >>stdout || { cat stdout; Exit 1; }
 +  cat stdout
 +  count_test_results total=7 pass=7 fail=0 skip=0 xfail=0 xpass=0 error=0
 +  for t in $tests; do grep "^PASS: $t *$" stdout; done
 +
 +  grep '== .*/foo\.sh =='       foo.log
 +  grep '== .*/foo\.t\.sh =='    foo.t.log
 +  grep '== .*/foo\.sh\.t =='    foo.sh.log
 +  grep '== .*/foo\.x\.x =='     foo.x.log
 +  grep '== .*/foo\.x\.t\.sh ==' foo.x.t.log
 +  grep '== .*/foo\.t\.x\.sh ==' foo.t.x.log
 +  grep '== .*/foo\.sh\.t\.x ==' foo.sh.t.log
 +
 +  $MAKE $j clean
 +  test ! -f foo.log
 +  test ! -f foo.t.log
 +  test ! -f foo.sh.log
 +  test ! -f foo.x.log
 +  test ! -f foo.x.t.log
 +  test ! -f foo.t.x.log
 +  test ! -f foo.sh.t.log
 +
 +done
 +
 +:
index b94fd16698144706d5b6d61229cc1439030c11e1,0000000000000000000000000000000000000000..c8b3b8f8d32f7639ebaad9e7b10e2381fbfaccb6
mode 100755,000000..100755
--- /dev/null
@@@ -1,144 -1,0 +1,143 @@@
- am_parallel_tests=yes
 +#! /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/>.
 +
 +# Check that dynamic content for $(TESTS) is supported, both when set from
 +# inside the Makefile.am and when overriddend from the command line.
 +
 +. ./defs || Exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > ok <<'END'
 +#!/bin/sh
 +exit 0
 +END
 +
 +cat > ko <<'END'
 +#!/bin/sh
 +exit 1
 +END
 +
 +cat > er << 'END'
 +#!/bin/sh
 +echo $0 should not be run >&2
 +exit 99
 +END
 +
 +chmod a+x ko ok
 +
 +mkdir t
 +cp ok t/nosuffix
 +
 +cp ok g1.sh
 +cp ok g2.sh
 +cp ok g3.sh
 +cp ok g4.sh
 +cp er g5.sh
 +
 +cp ok t00-foo.sh
 +cp ok t02.sh
 +cp ok t57_mu.sh
 +cp ok t7311.sh
 +cp ko t98S.sh
 +cp ko t99.sh
 +cp er t1.sh
 +cp er t9.sh
 +cp er tx98.sh
 +
 +cat > get-tests-list <<END
 +#!/bin/sh
 +echo "g1.sh  ${tab}g2.sh "
 +if :; then echo '  g3.sh'; fi
 +echo
 +echo g4.sh
 +END
 +chmod a+x get-tests-list
 +
 +cat > Makefile.am << 'END'
 +my_add_dirprefix = $(strip $(1))/$(strip $(2))
 +EXTRA_DIST = $(TESTS) get-tests-list
 +TEST_EXTENSIONS = .sh
 +TESTS = $(wildcard $(srcdir)/t[0-9][0-9]*.sh)
 +TESTS += $(shell $(srcdir)/get-tests-list)
 +TESTS += $(call my_add_dirprefix, t, nosuffix)
 +XFAIL_TESTS = $(wildcard $(srcdir)/t9[0-9]*.sh)
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +$MAKE check > stdout || { cat stdout; Exit 1; }
 +cat stdout
 +
 +count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
 +
 +grep '^PASS: t/nosuffix$' stdout
 +grep '^PASS: g1\.sh$'     stdout
 +grep '^PASS: g2\.sh$'     stdout
 +grep '^PASS: g3\.sh$'     stdout
 +grep '^PASS: g4\.sh$'     stdout
 +grep '^PASS: t00-foo\.sh' stdout
 +grep '^PASS: t02\.sh'     stdout
 +grep '^PASS: t57_mu\.sh'  stdout
 +grep '^PASS: t7311\.sh'   stdout
 +grep '^XFAIL: t98S\.sh'   stdout
 +grep '^XFAIL: t99\.sh'    stdout
 +
 +$MAKE mostlyclean
 +test "`find . -name *.log`" = ./config.log
 +
 +$MAKE distcheck > stdout || { cat stdout; Exit 1; }
 +cat stdout
 +count_test_results total=11 pass=9 fail=0 xpass=0 xfail=2 skip=0 error=0
 +
 +$MAKE check tests1='$(wildcard t00*.sh t98?.sh)' \
 +            tests2='$(shell ./get-tests-list | sed 1d)' \
 +            TESTS='$(tests1) $(tests2)' \
 +  > stdout || { cat stdout; Exit 1; }
 +cat stdout
 +
 +count_test_results total=4 pass=3 fail=0 xpass=0 xfail=1 skip=0 error=0
 +
 +grep '^PASS: g3\.sh$'     stdout
 +grep '^PASS: g4\.sh$'     stdout
 +grep '^PASS: t00-foo\.sh' stdout
 +grep '^XFAIL: t98S\.sh'   stdout
 +
 +$MAKE mostlyclean
 +test "`find . -name *.log`" = ./config.log
 +
 +$MAKE check TESTS='$(shell echo t00 | sed "s/$$/-foo/") t99'
 +test -f t00-foo.log
 +test -f t99.log
 +
 +$MAKE check \
 +      foo='E9E9E' \
 +      a='t00.err' \
 +      b='${a:.err=-foo}' \
 +      TESTS='$(b) t$(subst E,,$(foo)) $(call my_add_dirprefix,t,nosuffix)' \
 +  > stdout || { cat stdout; Exit 1; }
 +cat stdout
 +
 +count_test_results total=3 pass=2 fail=0 xpass=0 xfail=1 skip=0 error=0
 +grep '^PASS: t/nosuffix'  stdout
 +grep '^PASS: t00-foo\.sh' stdout
 +grep '^XFAIL: t99\.sh'    stdout
 +
 +:
index f16095bc1ced50b9e1a9ee7b6148c87ed29cb84e,619eae5566f87f0304bbf8fa54cf6b3a37737701..9edd26021f5bb5407b10d37671b2dfeb66166dfe
  # 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:
 -# - empty TESTS
 -# - empty TEST_LOGS
 +# Check parallel-tests features: empty TESTS
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
  cat >> configure.ac << 'END'
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index fc922a519e5f1ae5004fd3e6fc8756cce1b8534f,60dd7bd50c4151248a34ee89be16d635e93e9f9d..301eb57d049eea1336d6146c61de9ed6f1a8bfab
@@@ -15,9 -15,8 +15,8 @@@
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # Test the example of usage of generic and extension-specific
 -# LOG_COMPILER and LOG_FLAGS given in the manual.
 +# LOG_COMPILER, LOG_FLAGS and LOG_DEPENDNECIES given in the manual.
  
- am_parallel_tests=yes
  required=python
  . ./defs || Exit 1
  
index d93685d5400b6ba69afcc7757e04b997f39ce6f4,0000000000000000000000000000000000000000..a2d06ca329a9fa68957d39c848df6befdb9b0fc2
mode 100755,000000..100755
--- /dev/null
@@@ -1,65 -1,0 +1,64 @@@
- am_parallel_tests=yes
 +#! /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/>.
 +
 +# The parallel-tests driver must prefer tests with an extension to
 +# extension-less tests.  This is required to allow the user to have
 +# a, say, 'all.test' test case even in the face of the 'all' target.
 +
 +. ./defs || Exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > foo <<'END'
 +#!/bin/sh
 +echo "foo without suffix run" >&2
 +exit 99
 +END
 +
 +cat > foo.test <<'END'
 +#!/bin/sh
 +echo "$0 has been run"
 +END
 +chmod a+x foo.test
 +
 +cp foo.test all.test
 +cp foo.test dist.test
 +cp foo.test install.test
 +cp foo.test bad-target.test
 +
 +cat > Makefile.am << 'END'
 +bad-target:
 +      @echo $@ has been run >&2; exit 1
 +install-data-local:
 +      @echo $@ has been run >&2; exit 1
 +TESTS = foo.test all.test install.test dist.test bad-target.test
 +EXTRA_DIST = oops-this-does-not-exist
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure --prefix="`pwd`/inst"
 +
 +$MAKE check
 +ls -l # For debugging.
 +test ! -d inst
 +for t in foo all install dist bad-target; do
 +  grep "$t\.test has been run" $t.log
 +done
 +
 +:
Simple merge
Simple merge
index c3220c05d8e1c8a75c863ef379caaa5616242e36,0000000000000000000000000000000000000000..2c696506a6f6ea86b5e9c79bd58b5659b7f349ce
mode 100755,000000..100755
--- /dev/null
@@@ -1,44 -1,0 +1,43 @@@
- am_parallel_tests=yes
 +#! /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/>.
 +
 +# The parallel-tests harness do not cause the same test to be
 +# uselessly run multiple times.
 +
 +. ./defs || Exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +echo TESTS = foo.test > Makefile.am
 +
 +cat > foo.test <<'END'
 +#! /bin/sh
 +ls -l && mkdir bar
 +END
 +chmod a+x foo.test
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +$MAKE -j1 check || { cat test-suite.log; Exit 1; }
 +rmdir bar
 +$MAKE -j2 check || { cat test-suite.log; Exit 1; }
 +rmdir bar
 +$MAKE -j4 check || { cat test-suite.log; Exit 1; }
 +
 +:
index 496c9f6effdfdf09bccd52037c2007d58e09a62c,0000000000000000000000000000000000000000..d60a609e2c6b47af9f0d6f697b0b4a62b7e036bb
mode 100755,000000..100755
--- /dev/null
@@@ -1,163 -1,0 +1,162 @@@
- am_parallel_tests=yes
 +#! /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/>.
 +
 +# The user should be able to easily specify extra dependencies for
 +# the test cases, depending on their extension (or lack thereof).
 +# We do so with the help of "${prefix}LOG_DEPENDENCIES" variables.
 +# See the last wishlist in automake bug#11287.
 +
 +. ./defs || Exit 1
 +
 +cat >> configure.ac <<'END'
 +AC_SUBST([EXEEXT], [.bin])
 +AC_OUTPUT
 +END
 +
 +cat > Makefile.am << 'END'
 +TEST_EXTENSIONS = .test .sh
 +TESTS = foo.test foo2.test bar.sh baz zard.oz quux.bin mu.test.bin
 +
 +TEST_LOG_DEPENDENCIES = test-dep
 +SH_LOG_DEPENDENCIES = sh-dep1 sh-dep2
 +LOG_DEPENDENCIES = dep
 +
 +DEPS = test-dep sh-dep1 sh-dep2 dep new-test-dep
 +$(DEPS):
 +      echo dummy > $@
 +CLEANFILES = $(DEPS)
 +
 +.PHONY: setup
 +setup:
 +      chmod a+x $(TESTS)
 +EXTRA_DIST = $(TESTS)
 +END
 +
 +cat > foo.test <<'END'
 +#! /bin/sh
 +test -f test-dep || test -f new-test-dep
 +END
 +
 +cat > foo2.test <<'END'
 +#! /bin/sh
 +test -f test-dep
 +END
 +
 +cp foo2.test mu.test.bin
 +
 +cat > bar.sh <<'END'
 +#! /bin/sh
 +test -f sh-dep1 && test -f sh-dep2
 +END
 +
 +cat > baz <<'END'
 +#! /bin/sh
 +test -f dep
 +END
 +
 +cp baz quux.bin
 +
 +cat > zard.oz <<'END'
 +#! /bin/sh
 +test -f dep
 +END
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +$MAKE setup
 +
 +cleanup () { rm -f test-dep sh-dep1 sh-dep2 dep; }
 +
 +$MAKE check -j4
 +test ! -f new-test-dep
 +test -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test -f dep
 +test -f quux.log  # Sanity check.
 +test -f mu.log    # Likewise.
 +
 +cleanup
 +
 +$MAKE check TESTS=foo.test
 +test -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +rm -f bar.log
 +$MAKE check TESTS=bar.sh AM_LAZY_CHECK=yes
 +test ! -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS=baz
 +test ! -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test -f dep
 +
 +cleanup
 +$MAKE check TESTS='foo bar'
 +test -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS=zard.oz
 +test ! -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test -f dep
 +
 +cleanup
 +$MAKE check TESTS=mu.test.bin
 +test -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS='quux.bin bar.sh'
 +test ! -f test-dep
 +test -f sh-dep1
 +test -f sh-dep2
 +test -f dep
 +
 +cleanup
 +$MAKE check TESTS=foo TEST_LOG_DEPENDENCIES=new-test-dep
 +test -f new-test-dep
 +test ! -f test-dep
 +test ! -f sh-dep1
 +test ! -f sh-dep2
 +test ! -f dep
 +
 +cleanup
 +$MAKE check TESTS=baz XFAIL_TESTS=baz LOG_DEPENDENCIES=
 +test ! -f dep
 +grep ':test-result: XFAIL' baz.trs
 +
 +$MAKE distcheck
 +
 +:
index 4c834d900e582658b81a2934a2d5bb32de07e7e7,0000000000000000000000000000000000000000..db81aa6e0c85f8762aa33c2f2e99595431a852de
mode 100755,000000..100755
--- /dev/null
@@@ -1,86 -1,0 +1,85 @@@
- am_parallel_tests=yes
 +#! /bin/sh
 +# Copyright (C) 2009-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/>.
 +
 +# Check parallel-tests features:
 +# - 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.  :-/
 +
 +. ./defs || Exit 1
 +
 +echo AC_OUTPUT >> configure.ac
 +
 +cat > Makefile.am << 'END'
 +TESTS = \
 +  $(srcdir)/foo \
 +  @srcdir@/foo2 \
 +  @srcdir@/bar.test \
 +  ${srcdir}/sub/baz.test \
 +  built.test
 +
 +XFAIL_TESTS = $(srcdir)/bar.test foo2
 +
 +built.test:
 +      (echo '#!/bin/sh' && echo 'exit 77') >$@-t
 +      chmod a-w,a+x $@-t && mv -f $@-t $@
 +END
 +
 +cat > foo <<'END'
 +#!/bin/sh
 +exit 0
 +END
 +chmod a+x foo
 +
 +cat > foo2 <<'END'
 +#!/bin/sh
 +exit 1
 +END
 +chmod a+x foo2
 +
 +cp foo2 bar.test
 +
 +mkdir sub
 +cp foo sub/baz.test
 +
 +$ACLOCAL
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +mkdir build
 +cd build
 +../configure
 +$MAKE check
 +
 +ls -l . .. # For debugging.
 +
 +test -f built.log
 +test -f foo.log
 +test -f bar.log
 +test -f sub/baz.log
 +test -f test-suite.log
 +
 +test ! -f ../built.log
 +test ! -f ../foo.log
 +test ! -f ../bar.log
 +test ! -f ../sub/baz.log
 +test ! -f ../test-suite.log
 +
 +:
Simple merge
index 538ee75509344d13e7025eb4ef1e37a40333934f,459a24daf18f608835ebb328a601f82b3821e04f..2530134ceac9b5a26e204f90ab2ba14de7935398
  #  - log files, and what goes in 'test-suite.log'
  #  - make clean
  #  - dependencies between tests
 -#  - TESTS redefinition at runtime
 -#  - TEST_LOGS redefinition at runtime
 -#  - RECHECK_LOGS redefinition at runtime
 +#  - TESTS redefinition at runtime (with and without test suffixes)
 +#  - AM_LAZY_CHECK
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
  cat >> configure.ac << 'END'
Simple merge
Simple merge
index 62256e0a5f77121bf7dd4c67a2b614fb0f57373d,bb5a876ab511c049eb03dbf8e16f2869c0c10469..4c01560bee9efb972b7d6cd9ff43cd738095dcf1
@@@ -20,8 -20,7 +20,7 @@@
  # Actually, this test doesn't ensure that things happen concurrently.
  # It merely serves as demonstration.  :-)
  
- am_parallel_tests=yes
 -required='cc native GNUmake'
 +required='cc native'
  . ./defs || Exit 1
  
  cat >> configure.ac << 'END'
index 76ba5962e143b6d0b71c493d1714044c50c3264a,46b455c0edb66395fcf3dd66abdc0f4f213d7411..94b464d5d453ee35c6a6f64be7a8fd0eeab98694
  
  # Check parallel-tests features:
  # - empty TESTS
 -# BSD make will expand '$(TESTS:=.log)' to '.log' unless overridden.
  # See parallel-tests10.test for a similar issue.
  
- am_parallel_tests=yes
  . ./defs || Exit 1
 +
  cat >> configure.ac << 'END'
  AC_OUTPUT
  END
index 46e412047f8a21fbff078f0a1cedc59b574e318b,7363929d3a6b813fefa40b97be351394e0410a9a..4f322319a455dc25967873893bf0587d2e9a5f77
  # 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:
 -# - 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.  :-/
 +# Check parallel-tests features: generated distributed tests.
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
  cat >> configure.ac << 'END'
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc t/tap-basic.sh
Simple merge
diff --cc t/tap-color.sh
Simple merge
index cd0a14d62b50de764b0f38bc3fbb06688fe85c03,8400da04b7adfc1857bab88eb98025955a7bf94b..b4026d5c19b331fa3ecf7e895ec1855a539abb1d
  
  # Auxiliary test to set up common data used by many tests on TAP support.
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
 -cat >> configure.ac << END
 +cat >> configure.ac << 'END'
 +# FIXME: must define this otherwise automake will require the presence
 +# FIXME: of the 'test-driver' script.  This issue should be documented
 +# FIXME: in the manual ...
 +AC_SUBST([LOG_DRIVER],
 +         ['$(error LOG_DRIVER should be never used) false'])
  AC_OUTPUT
  END
  
diff --cc t/tap-deps.sh
Simple merge
Simple merge
Simple merge
diff --cc t/tap-doc.sh
Simple merge
diff --cc t/tap-doc2.sh
Simple merge
Simple merge
Simple merge
index de92c3d6b98bae1f2cf45aa0250c34174dec7d63,7fb2b807fc17c12a8749b3454aa909c0f0a69622..408646a8550e5abeeb50a3cd844616194c55d33b
@@@ -14,9 -14,9 +14,8 @@@
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# TAP support:
 -# - RECHECK_LOGS
 +# TAP support: AM_LAZY_CHECK
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
  cat > Makefile.am << 'END'
diff --cc t/tap-log.sh
Simple merge
Simple merge
diff --cc t/tap-more.sh
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc t/tap-plan.sh
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 9eb8f8d376630da66a5eea931989614051b8eb8b,5ceb3393a526e26fb94c99361440de0ef2335ac9..c1df52b523d0212871f7898749778853779ba7db
  
  # Custom test drivers: try the "recheck" functionality with test protocols
  # that allow multiple testcases in a single test script.  In particular,
 -# check that this still works when we override $(TESTS) and $(TEST_LOGS)
 -# at make runtime.
 -# See also related tests 'test-driver-custom-multitest-recheck.test' and
 -# 'parallel-tests-recheck-override.test'.
 +# check that this still works when we override $(TESTS) at make runtime.
 +# See also related tests 'test-driver-custom-multitest-recheck.test'.
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
  cp "$am_testauxdir"/trivial-test-driver . \
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc t/test-log.sh
Simple merge
Simple merge
Simple merge
Simple merge
index 7ede224255f87ede62b289594450f99070df2782,2491da5b39b6351a5ae6ce49dfb6f189a9f55112..115aed93acdac1c90e09aecbbb981c9fb75f1e9e
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# parallel-tests:
 -#  - non-existent scripts listed in TESTS get diagnosed
 -# See also related test 'test-missing2.test'.
 +# parallel-tests: non-existent scripts listed in TESTS get diagnosed.
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
  cat >> configure.ac << 'END'
Simple merge
index 0a03bdfdff55b903b543f914526df76a1596fcd4,801300bd75bd386f3b8eee84b9d7e3a0de3fd025..fd8d1831263860781a8b3360a78fef20fde9e17c
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 -# parallel-tests support: the following are registered with '.SUFFIXES':
 -#  - .log
 -#  - .trs (used by files that store test results and metadata)
 -#  - .test if $(TEST_EXTENSIONS) is not defined
 -#  - stuff in $(TEST_EXTENSIONS) otherwise
 +# Check parallel harness features:
 +#  - recovery from deleted '.log' and '.trs' files, with parallel make
  
- am_parallel_tests=yes
  . ./defs || Exit 1
  
 -: > Makefile.am
 +all= log= trs=
 +for i in 1 2 3 4 5 6 7 8 9 10 11 12; do
 +  all="$all $i" log="$log $i" trs="$trs $i"
 +done
  
 -cat > 1.am << 'END'
 -TESTS =
 -END
 +echo AC_OUTPUT >> configure.ac
 +echo TESTS = > Makefile.am
  
 -cat > 2.am << 'END'
 -TEST_EXTENSIONS = .SH .abcdef
 -TESTS =
 -END
 +for i in $all; do
 +  echo TESTS += $i.test >> Makefile.am
 +  (echo "#!/bin/sh" && echo "mkdir $i.d") > $i.test
 +  chmod a+x $i.test
 +done
  
 -: > test-driver
 +ls -l # For debugging.
  
  $ACLOCAL
 -
 -$AUTOMAKE 1
 -$AUTOMAKE 2
 -
 -sed -e 's/$/ /' 1.in > mk.1
 -sed -e 's/$/ /' 2.in > mk.2
 -
 -grep '^\.SUFFIXES:' mk.1
 -grep '^\.SUFFIXES:' mk.2
 -
 -for suf in test log trs; do
 -  grep "^\\.SUFFIXES:.* \\.$suf " mk.1
 -done
 -
 -for suf in SH abcdef log trs; do
 -  grep "^\\.SUFFIXES:.* \\.$suf " mk.2
 +$AUTOCONF
 +$AUTOMAKE -a
 +
 +./configure
 +
 +: Create the required log files.
 +$MAKE check
 +
 +for n in 1 2 5 7 12; do
 +  for suf in log trs; do
 +    rmdir *.d
 +    rm -f *.$suf
 +    $MAKE -j$n check
 +    for f in $all; do
 +      test -f $f.log
 +      test -f $f.trs
 +    done
 +  done
  done
  
  :
Simple merge
Simple merge
diff --cc t/yacc-cxx.sh
Simple merge