automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, branch-1.11, updated. v1.11.1-557-gf7168f9
Date: Thu, 20 Oct 2011 20:54:51 +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=f7168f9000f1cbc504d7e64a5a65aa4393b5aa9c

The branch, branch-1.11 has been updated
       via  f7168f9000f1cbc504d7e64a5a65aa4393b5aa9c (commit)
       via  d2b90968332e5903a1408d49ec967602e499363d (commit)
       via  7cb64d4f6501319acc6984adb3589f60f6e047e9 (commit)
       via  65c015849f02bec4b7c106758be71db12f602d73 (commit)
       via  100e97400a06c0f9af0ea7be99aa60be95c624bf (commit)
       via  f8f8ec0e6c0dbcaa458e48efa7b5c64960e528bd (commit)
       via  d91f357d9841d2da2fe7538bbcff73bcca94435a (commit)
       via  7a770586e81edba77ebdbd83fb6ca6fed39d2fab (commit)
       via  8c021e00169da8802d47e9428e282aa6ff78b656 (commit)
       via  f5b69b8a0d787cf798653fdb975affa9e7ff44b8 (commit)
       via  7e5ae808d830c9319a4dd3d357b10dcf4315f529 (commit)
       via  94ad7e48dc63321ca334e71c0f87dc3eada8ffd6 (commit)
       via  02ab80cebbb9efc1e3dfbd3034dc517f3c5e099d (commit)
       via  ae412c3817a7fe6d553863c0b2a825bd400e4b76 (commit)
       via  ba0c477b275aaae0e4f77003ac96f4cc2ec12ebf (commit)
       via  d710255c09afd2d6e06d72259816988a0a79ea18 (commit)
       via  b9b79d887abdc615bae92a9dd79de881664d19d3 (commit)
       via  7d40532a3464eee6a26d303c378c44af95075698 (commit)
       via  39a9fd16381469f911d42a3e27975edcb248bbf2 (commit)
       via  736fde9f6cf8d514ef30dc5d83fe2a41c3e22c9a (commit)
       via  0773a99888c8932c19b61145d78317278d2bdd66 (commit)
       via  1cfe9542265d1d2a36d7cd90751b2ed269b0fbd3 (commit)
      from  e8af45d7cbcdb524fcce8c40b90a6d331e6ac57c (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 f7168f9000f1cbc504d7e64a5a65aa4393b5aa9c
Merge: e8af45d d2b9096
Author: Stefano Lattarini <address@hidden>
Date:   Thu Oct 20 22:54:09 2011 +0200

    Merge branch 'maint' into branch-1.11
    
    * maint:
      tests: fix spurious failures with "chatty" make implementations
      tests: fix spurious failure on fast machines
      tests: avoid spurious failure of 'uninstall-fail.test' on Solaris
      tests: avoid spurious failure of 'uninstall-fail.test' on Cygwin
      tests: avoid spurious failure in 'parallel-tests3.test'
      tests: fix spurious failure with FreeBSD make and Yacc in VPATH
      tests: fix spurious failure with autoconf 2.62
      docs: avoid using colon character inside arguments of @pxref
      parallel-tests: warn on conditional TEST_EXTENSIONS definition
      parallel-tests: don't allow @substitutions@ in TEST_EXTENSIONS
      tests: fix spurious failure in 'insthook.test'
      maintcheck: fix spurious failure
      regenerate Makefile.in

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |  121 ++++++++++++++++
 Makefile.in                                        |    2 +-
 NEWS                                               |   11 +-
 THANKS                                             |    2 +-
 automake.in                                        |   34 ++++-
 doc/automake.texi                                  |    2 +-
 lib/am/distdir.am                                  |    4 +-
 tests/Makefile.am                                  |    2 +
 tests/Makefile.in                                  |    2 +
 tests/aclocal-path-install-serial.test             |    4 +-
 tests/aclocal-path-precedence.test                 |    4 +-
 tests/distcheck-missing-m4.test                    |   15 ++-
 tests/distcheck-outdated-m4.test                   |   16 ++-
 tests/insthook.test                                |    6 +-
 tests/parallel-tests3.test                         |   19 ++-
 tests/subpkg-yacc.test                             |  150 ++++++++++++++++++++
 tests/subpkg.test                                  |   28 +---
 ...tests-subdir.test => test-extensions-cond.test} |   63 ++++++---
 tests/test-extensions.test                         |   21 ++--
 tests/uninstall-fail.test                          |   13 +-
 20 files changed, 426 insertions(+), 93 deletions(-)
 create mode 100755 tests/subpkg-yacc.test
 copy tests/{parallel-tests-subdir.test => test-extensions-cond.test} (54%)

diff --git a/ChangeLog b/ChangeLog
index 83cf9c2..6d058ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,124 @@
+2011-10-18  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure with FreeBSD make and Yacc in VPATH
+       * tests/subpkg.test: Some cosmetic adjustments.  Move the tests
+       checking that $(YLWRAP) is defined and installed properly when
+       ylwrap is in a default auxdir found in a parent package ...
+       * tests/subpkg-yacc.test: ... into this new test, which carefully
+       avoids to trigger the known bug#7884 (combo FreeBSD make plus Yacc
+       plus VPATH build).
+       * tests/Makefile.am (TESTS): Update.
+
+2011-10-18  Stefano Lattarini  <address@hidden>
+
+       tests: avoid spurious failure in 'parallel-tests3.test'
+       This fixes automake bug#8788.
+       * tests/parallel-tests3.test: To ensure that the serial run of
+       the dummy testsuite is still ongoing when the parallel run has
+       terminated, use `kill -0', not a bare `kill'.  This will prevent
+       a testsuite crash on NetBSD 5.1, and a testsuite hang on FreeBSD
+       8.2.  Also, since we are at it, try harder to avoid possible
+       hangs of the script in other unusual situations.
+
+2011-10-20  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failures with "chatty" make implementations
+       * tests/distcheck-missing-m4.test: On failure, some make
+       implementations (such as Solaris make) print the whole failed
+       recipe on standard output.  This was causing a spurious failure
+       in the checks grepping the output from make.  Work around this.
+       * tests/distcheck-outdated-m4.test: Likewise.
+
+2011-10-20  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure on fast machines
+       * tests/aclocal-path-precedence.test: Also remove the `configure'
+       script between different test runs, to ensure it is always remade
+       by autoconf.  Add proper explicative comments.
+
+2011-10-20  Stefano Lattarini  <address@hidden>
+
+       tests: avoid spurious failure of 'uninstall-fail.test' on Solaris
+       * tests/uninstall-fail.test: All the Solaris 10 shells (/bin/sh,
+       /bin/ksh, and /usr/xpg4/bin/sh), upon failing to chdir to a
+       directory with the `cd' builtin, print a message like:
+         "sh: /root: permission denied"
+       which doesn't report the `cd' builtin anywhere.  Relax the grepping
+       of the error message accordingly.
+
+2011-10-19  Stefano Lattarini  <address@hidden>
+
+       tests: avoid spurious failure of 'uninstall-fail.test' on Cygwin
+       * tests/uninstall-fail.test: Be sure to really skip this test
+       on systems that allows files to be removed from unwritable
+       directories.  Motivated by a spurious failure on Cygwin 1.5.
+
+2011-10-17  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure with autoconf 2.62
+       * tests/aclocal-path-precedence.test: Rewrite configure.in,
+       rather than appending to it, to avoid spurious failures (at
+       least with autoconf 2.62) due to repeated calls to AC_INIT.
+       Also, add package name and version arguments to AC_INIT, to
+       avoid spurious errors from automake.
+
+2011-10-16  Stefano Lattarini  <address@hidden>
+
+       docs: avoid using colon character inside arguments of @pxref
+       Fixes automake bug#9753
+       * doc/automake.texi (VPATH Builds): Avoid using colon character
+       `:' inside arguments of @pxref, as this can cause problems in
+       the generated `.info' files, and such an usage will be explicitly
+       forbidden by future texinfo documentation.
+       * THANKS: Update.
+       Reported by Дилян Палаузов.
+
+2011-10-07  Stefano Lattarini  <address@hidden>
+
+       parallel-tests: warn on conditional TEST_EXTENSIONS definition
+       Before this change, automake would have still bailed out, but
+       with a confusing error message (about an invalid redefinition
+       of TEST_EXTENSIONS).
+       * automake.in (handle_tests): Warn explicitly if TEST_EXTENSIONS
+       has conditional contents.
+       * tests/test-extensions-con.test: New test.
+       * tests/Makefile.am (TESTS): Add it.
+       * NEWS: Update.
+
+2011-10-06  Stefano Lattarini  <address@hidden>
+
+       parallel-tests: don't allow @substitutions@ in TEST_EXTENSIONS
+       Even after the last commit `v1.11-476-g90bea64', the checks
+       performed by automake on entries in $(TEST_EXTENSIONS) tried to
+       allow for @substitited@ stuff.  This however ends up allowing
+       quite brittle setups, which, most importantly, are of no real
+       practical usefulness anyway.  So it's better to just disallow
+       @substitutions@ in TEST_EXTENSIONS altogether, offering a clear
+       error message, instead of risking weird bugs and unexpected
+       behaviors in the generated Makefile.in.
+       * automake.in ($TEST_EXTENSION_PATTERN): Turned from a regular
+       expression ...
+       (is_valid_test_extension): ... into this subroutine.  Don't allow
+       generic @substitutions@ anymore (possibly making an exception for
+       address@hidden@' under the proper circumstances).
+       * tests/test-extensions.test: Adjust and extend.
+
+2011-10-06  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure in 'insthook.test'
+       * tests/insthook.test (Makefile.am): Add a proper `uninstall-hook'
+       target to remove the symlink created by the `install-exec-hook'
+       target; this prevents "make distcheck" from failing spuriously.
+       Since we are at it, delete an extra blank line, and add a trailing
+       `:' command.
+
+2011-10-06  Stefano Lattarini  <address@hidden>
+
+       maintcheck: fix spurious failure
+       * lib/am/distdir.am: Use `$(infodir)', not `${infodir}', to avoid
+       complaints from the `sc_no_brace_variable_expansions' maintainer
+       check.
+
 2011-10-06  Stefano Lattarini  <address@hidden>
 
        fix: make a test script executable
diff --git a/Makefile.in b/Makefile.in
index 46fc1fe..cb969c4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -152,7 +152,7 @@ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
-  | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
diff --git a/NEWS b/NEWS
index cb8aac3..6254fc0 100644
--- a/NEWS
+++ b/NEWS
@@ -51,11 +51,12 @@ Bugs fixed in 1.11.1a:
     does not report spurious successes when used with concurrent FreeBSD
     make (e.g., "make check -j3").
 
-  - Automake now explicitly rejects invalid entries in TEST_EXTENSIONS when
-    the parallel-tests diver is in use, instead of issuing confusing and
-    apparently unrelated error messages (about "non-POSIX variable name"
-    or "bad characters in variable name"), or even, in some situations,
-    producing broken `Makefile.in' files.
+  - When the parallel-tests driver is in use, automake now explicitly
+    rejects invalid entries and conditional contents in TEST_EXTENSIONS,
+    instead of issuing confusing and apparently unrelated error messages
+    (e.g., "non-POSIX variable name", "bad characters in variable name",
+    or "redefinition of TEST_EXTENSIONS), or even, in some situations,
+    silently producing broken `Makefile.in' files.
 
   - The `silent-rules' option now also silences all compile rules if dependency
     tracking is disabled.  Also, when `silent-rules' is not used, the output 
from
diff --git a/THANKS b/THANKS
index 81c97fb..ad9a448 100644
--- a/THANKS
+++ b/THANKS
@@ -83,7 +83,7 @@ Diab Jerius           address@hidden
 Didier Cassirame       address@hidden
 Dieter Baron           address@hidden
 Dieter Jurzitza                address@hidden
-Dilyan Palauzov                address@hidden
+Дилян Палаузов          address@hidden
 Dmitry Mikhin          address@hidden
 Dmitry V. Levin                address@hidden
 Doug Evans             address@hidden
diff --git a/automake.in b/automake.in
index a60bc9f..516e594 100755
--- a/automake.in
+++ b/automake.in
@@ -213,8 +213,6 @@ my $DASH_D_PATTERN = "(^|\\s)-d(\\s|\$)";
 # Directories installed during 'install-exec' phase.
 my $EXEC_DIR_PATTERN =
   '^(?:bin|sbin|libexec|sysconf|localstate|lib|pkglib|.*exec.*)' . "\$";
-# Suffixes that can appear in TEST_EXTENSIONS (parallel-tests support).
-my $TEST_EXTENSION_PATTERN = '^(\.[a-zA-Z_][a-zA-Z0-9_]*|@[a-zA-Z0-9_]+@)$';
 
 # Values for AC_CANONICAL_*
 use constant AC_CANONICAL_BUILD  => 1;
@@ -4929,6 +4927,19 @@ sub handle_tests_dejagnu
     $output_rules .= file_contents ('dejagnu', new Automake::Location);
 }
 
+# is_valid_test_extension ($EXT)
+# ------------------------------
+# Return true if $EXT can appear in $(TEST_EXTENSIONS), return false
+# otherwise.
+sub is_valid_test_extension ($)
+{
+  my $ext = shift;
+  return 1
+    if ($ext =~ /^\.[a-zA-Z_][a-zA-Z0-9_]*$/);
+  return 1
+    if (exists $configure_vars{'EXEEXT'} && $ext eq subst ('EXEEXT'));
+  return 0;
+}
 
 # Handle TESTS variable and other checks.
 sub handle_tests
@@ -4971,17 +4982,26 @@ sub handle_tests
              $at_exeext = subst ('EXEEXT');
              $suff = $at_exeext  . ' ' . $suff;
            }
-         define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
-         # FIXME: this mishandles conditions.
-         my $var = rvar 'TEST_EXTENSIONS';
+          if (! var 'TEST_EXTENSIONS')
+            {
+             define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
+            }
+          my $var = var 'TEST_EXTENSIONS';
+          # Currently, we are not able to deal with conditional contents
+          # in TEST_EXTENSIONS.
+          if ($var->has_conditional_contents)
+           {
+            msg_var 'unsupported', $var,
+                     "`TEST_EXTENSIONS' cannot have conditional contents";
+           }
          my @test_suffixes = $var->value_as_list_recursive;
           if ((my @invalid_test_suffixes =
-                  grep { !/$TEST_EXTENSION_PATTERN/o } @test_suffixes) > 0)
+                  grep { !is_valid_test_extension $_ } @test_suffixes) > 0)
             {
               error $var->rdef (TRUE)->location,
                     "invalid test extensions: @invalid_test_suffixes";
             }
-          @test_suffixes = grep { /$TEST_EXTENSION_PATTERN/o } @test_suffixes;
+          @test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes;
          if ($handle_exeext)
            {
              unshift (@test_suffixes, $at_exeext)
diff --git a/doc/automake.texi b/doc/automake.texi
index df50a00..3bf5987 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -894,7 +894,7 @@ about some concurrency in the way build commands are run.  
For this
 reason we refer to such setups using the name @emph{VPATH builds} in
 the following.  @emph{VPATH} is the name of the @command{make} feature
 used by the @file{Makefile}s to allow these builds (@pxref{General
-Search, , @code{VPATH}: Search Path for All Prerequisites, make, The
+Search, , @code{VPATH} Search Path for All Prerequisites, make, The
 GNU Make Manual}).
 
 @cindex multiple configurations, example
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index ceb7e41..41ff14a 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -519,9 +519,9 @@ distuninstallcheck_listfiles = find . -type f -print
 ## The `dir' file (created by install-info) might still exist after
 ## uninstall, so we must be prepared to account for it.  The following
 ## check is not 100% strict, but is definitely good enough, and even
-## accounts for overridden ${infodir}.
+## accounts for overridden $(infodir).
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
-  | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
 distuninstallcheck:
        @test -n '$(distuninstallcheck_dir)' || { \
          echo 'ERROR: trying to run $@ with an empty' \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bf17aea..36ac88e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -635,6 +635,7 @@ parallel-tests-log-override-2.test \
 parallel-tests-log-override-recheck.test \
 parallel-tests-log-compiler-example.test \
 test-extensions.test \
+test-extensions-cond.test \
 parse.test \
 percent.test \
 percent2.test \
@@ -797,6 +798,7 @@ subpkg.test \
 subpkg2.test \
 subpkg3.test \
 subpkg4.test \
+subpkg-yacc.test \
 subst.test \
 subst2.test \
 subst3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index ea63131..c37ac21 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -919,6 +919,7 @@ parallel-tests-log-override-2.test \
 parallel-tests-log-override-recheck.test \
 parallel-tests-log-compiler-example.test \
 test-extensions.test \
+test-extensions-cond.test \
 parse.test \
 percent.test \
 percent2.test \
@@ -1081,6 +1082,7 @@ subpkg.test \
 subpkg2.test \
 subpkg3.test \
 subpkg4.test \
+subpkg-yacc.test \
 subst.test \
 subst2.test \
 subst3.test \
diff --git a/tests/aclocal-path-install-serial.test 
b/tests/aclocal-path-install-serial.test
index 15b4204..511ccee 100755
--- a/tests/aclocal-path-install-serial.test
+++ b/tests/aclocal-path-install-serial.test
@@ -45,7 +45,9 @@ win ()
     pdir) ok=pdir ko=sdir;;
        *) fatal_ "win(): invalud argument \`$1'";;
   esac
-  rm -rf aclocal.m4 autom4te*.cache m4/*
+  # This is required on fast machine, to avoid caching and timestamp
+  # issues with the autotools (already happened in practice).
+  rm -rf configure aclocal.m4 autom4te*.cache m4/*
   $ACLOCAL -I m4 --install
   test -f m4/foo.m4 # Sanity check.
   $AUTOCONF
diff --git a/tests/aclocal-path-precedence.test 
b/tests/aclocal-path-precedence.test
index b170dd5..c02fd3b 100755
--- a/tests/aclocal-path-precedence.test
+++ b/tests/aclocal-path-precedence.test
@@ -21,8 +21,8 @@ am_create_testdir=empty
 
 set -e
 
-cat >> configure.in << 'END'
-AC_INIT
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([parallel-tests])
 FOO_MACRO
 BAR_MACRO
diff --git a/tests/distcheck-missing-m4.test b/tests/distcheck-missing-m4.test
index 1a2b62f..1d42748 100755
--- a/tests/distcheck-missing-m4.test
+++ b/tests/distcheck-missing-m4.test
@@ -65,6 +65,15 @@ $AUTOCONF
 $EGREP 'MY_(FOO|BAR|BAZ|ZAR)' configure && Exit 1 # Sanity check.
 $AUTOMAKE
 
+check_no_spurious_error ()
+{
+  $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
+  # On failure, some make implementations (such as Solaris make) print the
+  # whole failed recipe on stdout.  The first grep works around this.
+  grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && Exit 1
+  : # To placate `set -e'.
+}
+
 ./configure
 
 $MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
@@ -72,8 +81,7 @@ cat output
 for x in bar baz zar; do
   $EGREP "required m4 file.*not distributed.* $x.m4( |$)" output
 done
-# Check that we don't fail for spurious errors.
-$EGREP -i 'mkdir:|autom4te.*\.cache|:.*(permission|denied)' output && Exit 1
+check_no_spurious_error
 
 # Now we use `--install', and "make distcheck" should pass.
 $ACLOCAL -I m4 --install
@@ -98,8 +106,7 @@ $MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
 cat output
 $EGREP "required m4 file.*not distributed.* qux.m4( |$)" output
 $EGREP "required m4 file.*not distributed.* bla.m4( |$)" output
-# Check that we don't fail for spurious errors.
-$EGREP -i 'mkdir:|autom4te.*\.cache|permission|denied' output && Exit 1
+check_no_spurious_error
 # Check that we don't complain for files that should have been found.
 $FGREP " (bar|baz|zar).m4" output && Exit 1
 
diff --git a/tests/distcheck-outdated-m4.test b/tests/distcheck-outdated-m4.test
index 7a3ade8..e3f265e 100755
--- a/tests/distcheck-outdated-m4.test
+++ b/tests/distcheck-outdated-m4.test
@@ -59,6 +59,15 @@ $AUTOMAKE
 ./configure
 $MAKE distcheck # Sanity check.
 
+check_no_spurious_error ()
+{
+  $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
+  # On failure, some make implementations (such as Solaris make) print the
+  # whole failed recipe on stdout.  The first grep works around this.
+  grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && Exit 1
+  : # To placate `set -e'.
+}
+
 # We start to use a new "third-party" macro in a new version
 # of a pre-existing third-party m4 file, but forget to re-run
 # "aclocal --install" by hand, relying on automatic remake
@@ -76,8 +85,7 @@ $MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
 cat output
 
 $EGREP "required m4 file.* outdated.* baz.m4( |$)" output
-# Check that we don't fail for spurious errors.
-$EGREP -i 'mkdir:|autom4te.*\.cache|permission|denied' output && Exit 1
+check_no_spurious_error
 # Check that we don't complain for files that aren't outdated.
 $EGREP " (foo|bar).m4" output && Exit 1
 
@@ -117,10 +125,8 @@ END
 $MAKE # Rebuild configure and makefiles.
 $MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
 cat output
-
 $EGREP "required m4 file.* outdated.* fnord.m4( |$)" output
-# Check that we don't fail for spurious errors.
-$EGREP -i 'mkdir:|autom4te.*\.cache|permission|denied' output && Exit 1
+check_no_spurious_error
 # Check that we don't complain for files that aren't outdated.
 $EGREP " (foo|bar|baz).m4" output && Exit 1
 
diff --git a/tests/insthook.test b/tests/insthook.test
index a315447..1b03324 100755
--- a/tests/insthook.test
+++ b/tests/insthook.test
@@ -37,6 +37,9 @@ installcheck-local:
        test -f "$(bindir)/foo"
        test -f "$(bindir)/foo-$(VERSION)"
        : > $(top_srcdir)/../ok
+
+uninstall-hook:
+       rm -f $(DESTDIR)$(bindir)/foo-$(VERSION)
 END
 
 echo 1 > foo
@@ -63,7 +66,6 @@ grep 1 bin/foo-1.0
 grep 2 bin/foo-2.0
 grep 2 bin/foo
 
-
 # install-hook is an error.
 cat >>Makefile.am <<EOF
 install-hook:
@@ -73,3 +75,5 @@ EOF
 AUTOMAKE_fails
 grep install-data-hook stderr
 grep install-exec-hook stderr
+
+:
diff --git a/tests/parallel-tests3.test b/tests/parallel-tests3.test
index a138f90..69ba1d0 100755
--- a/tests/parallel-tests3.test
+++ b/tests/parallel-tests3.test
@@ -70,15 +70,22 @@ $sleep
 : >stdout
 $MAKE -j4 check >> stdout
 cd ..
-kill $!
+# Ensure the tests are really being run in parallel mode: if this is
+# the case, the serial run of the dummy testsuite started above should
+# still be ongoing when the parallel one has terminated.
+kill -0 $!
 cat parallel/stdout
 test `grep -c PASS parallel/stdout` -eq 8
 
-# Wait long enough so that there are no open files any more
-# when the post-test cleanup runs.
-while test ! -f serial/test-suite.log
-do
-  $sleep
+# Wait long enough so that there are no open files any more when the
+# post-test cleanup runs.  But exit after we've waited for two minutes
+# or more, to avoid testsuite hangs in unusual situations (this has
+# already happened).
+i=1
+while test ! -f serial/test-suite.log && test $i -le 120; do
+  i=`expr $i + 1`
+  sleep '1' # Extra quoting to please maintainer-check.
 done
 $sleep
+
 :
diff --git a/tests/subpkg-yacc.test b/tests/subpkg-yacc.test
new file mode 100755
index 0000000..ee8af66
--- /dev/null
+++ b/tests/subpkg-yacc.test
@@ -0,0 +1,150 @@
+#! /bin/sh
+# Copyright (C) 2002, 2003, 2004, 2006, 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 ylwrap is installed properly, and $(YLWRAP) us defined
+# properly, when a subpackage is involved.
+
+required='cc yacc'
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_CONFIG_SUBDIRS([lib])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'EOF'
+SUBDIRS = lib
+bin_PROGRAMS = MU
+MU_LDADD = lib/liblib.a
+# It's ok to override distdir.
+distdir = subpack-1
+# Remove a file created by rules in subdir lib.
+CLEANFILES = lib-dist-hook-has-run
+EOF
+
+cat >MU.c <<'EOF'
+int lib (void);
+int main (void)
+{
+  return lib ();
+}
+EOF
+
+mkdir lib
+mkdir lib/src
+
+cat >lib/configure.ac <<'EOF'
+AC_INIT([lib], [2.3])
+AM_INIT_AUTOMAKE
+AC_PROG_RANLIB
+AC_PROG_YACC
+dnl This comes after YACC and RANLIB checks, deliberately.
+AC_PROG_CC
+AC_CONFIG_HEADERS([config.h:config.hin])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+EOF
+
+cat >lib/Makefile.am <<'EOF'
+noinst_LIBRARIES = liblib.a
+liblib_a_SOURCES = src/x.c foo.y
+EXTRA_liblib_a_SOURCES = bar.y
+
+dist-hook:
+       test -d $(top_distdir)
+       test -d $(distdir)
+       find $(top_distdir) $(distdir) ;: For debugging.
+       test -f $(top_distdir)/MU.c
+       test ! -f $(distdir)/MU.c
+       for suf in y c; do \
+         for name in foo bar; do \
+           test -f $(distdir)/$$name.$$suf || exit 1; \
+           test ! -f $(top_distdir)/$$name.$$suf || exit 1; \
+         done; \
+       done
+       test -f $(distdir)/foo.y
+       test ! -f $(top_distdir)/foo.y
+       test -f $(distdir)/src/x.c
+       test ! -f $(top_distdir)/src/x.c
+       test -f $(YLWRAP)
+       : > $(top_builddir)/../lib-dist-hook-has-run
+EOF
+
+cat > lib/foo.y << 'END'
+%{
+int yylex (void) { return 0; }
+void yyerror (char *s) {}
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+cp lib/foo.y lib/bar.y
+
+cat >lib/src/x.c <<'EOF'
+#include <config.h>
+int lib (void)
+{
+  return 0;
+}
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -Wno-override
+
+cd lib
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE -Wno-override --add-missing
+cd ..
+
+# Some checks here are slightly more tricky than we'd like, but we cannot
+# simply use "make distcheck", to avoid triggering a spurious failure due
+# to issues with FreeBSD make and VPATH builds (see automake bug#7884).
+
+./configure
+$MAKE
+$MAKE dist
+test -f lib-dist-hook-has-run
+test -f subpack-1.tar.gz
+test ! -d subpack-1 # Make sure "dist" cleans up after itself.
+
+mkdir workdir
+cd workdir
+gzip -c -d ../subpack-1.tar.gz | tar xf -
+test -d subpack-1
+mkdir build
+cd build
+../subpack-1/configure
+$MAKE
+$MAKE dist
+test -f lib-dist-hook-has-run
+test -f subpack-1.tar.gz
+test ! -d subpack-1 # Make sure "dist" cleans up after itself.
+
+# Don't trust non-GNU makes to do distcheck with a Yacc-using
+# package (see bug referenced above).
+if using_gmake; then
+  $MAKE distcheck || Exit 1
+fi
+
+:
diff --git a/tests/subpkg.test b/tests/subpkg.test
index 3662937..f197ad4 100755
--- a/tests/subpkg.test
+++ b/tests/subpkg.test
@@ -53,10 +53,8 @@ ACLOCAL_AMFLAGS = -I m4
 EOF
 
 cat >LDADD.c <<'EOF'
-int lib ();
-
-int
-main ()
+int lib (void);
+int main (void)
 {
   return lib ();
 }
@@ -69,7 +67,6 @@ cat >lib/configure.ac <<'EOF'
 AC_INIT([lib], [2.3])
 AM_INIT_AUTOMAKE
 AC_PROG_RANLIB
-AC_PROG_YACC
 AC_CONFIG_HEADERS([config.h:config.hin])
 AC_CONFIG_FILES([Makefile])
 FOO
@@ -77,33 +74,20 @@ EOF
 
 cat >lib/Makefile.am <<'EOF'
 noinst_LIBRARIES = liblib.a
-liblib_a_SOURCES = src/x.c foo.y
-EXTRA_liblib_a_SOURCES = bar.y
+liblib_a_SOURCES = src/x.c
 
 dist-hook:
        test ! -f $(distdir)/LDADD.c
        test -f $(top_distdir)/LDADD.c
        test -f $(distdir)/src/x.c
        test ! -f $(top_distdir)/src/x.c
-       test -f $(YLWRAP)
 
 ACLOCAL_AMFLAGS = -I ../m4
 EOF
 
-cat > lib/foo.y << 'END'
-%{
-int yylex () {return 0;}
-void yyerror (char *s) {}
-%}
-%%
-foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
-END
-
-cp lib/foo.y lib/bar.y
-
 cat >lib/src/x.c <<'EOF'
 #include <config.h>
-int lib ()
+int lib (void)
 {
   return 0;
 }
@@ -124,5 +108,7 @@ cd ..
 ./configure
 $MAKE
 $MAKE distcheck
-test ! -d subpack-1            # make sure distcheck cleans up after itself
+test ! -d subpack-1 # Make sure distcheck cleans up after itself.
 test -f subpack-1.tar.gz
+
+:
diff --git a/tests/parallel-tests-subdir.test b/tests/test-extensions-cond.test
similarity index 54%
copy from tests/parallel-tests-subdir.test
copy to tests/test-extensions-cond.test
index 18695fe..26409a8 100755
--- a/tests/parallel-tests-subdir.test
+++ b/tests/test-extensions-cond.test
@@ -14,8 +14,7 @@
 # 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 parallel-tests driver creates parent directories for
-# the log files when needed.
+# Expose bug in conditional definition of TEST_EXTENSIONS.
 
 parallel_tests=yes
 . ./defs || Exit 1
@@ -23,29 +22,51 @@ parallel_tests=yes
 set -e
 
 cat >> configure.in << 'END'
-AC_OUTPUT
+AM_CONDITIONAL([COND], [:])
+AM_CONDITIONAL([COND2], [:])
 END
 
-cat > Makefile.am << 'END'
-TESTS = dir1/foo.test dir2/dir3/foo.test
-TEST_LOG_COMPILER = sh
+$ACLOCAL
+
+cat > 1.am << 'END'
+TESTS =
+if COND
+## lineno 4
+TEST_EXTENSIONS = .foo
+endif
 END
 
-mkdir dir1 dir2 dir2/dir3
-echo : > dir1/foo.test
-echo : > dir2/dir3/foo.test
+cat > 2.am << 'END'
+TESTS =
+## lineno 3
+TEST_EXTENSIONS = .foo
+if COND
+# Do nothing.
+else
+TEST_EXTENSIONS += .bar
+endif
+END
 
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-mkdir build
-cd build
-../configure
-$MAKE check
-find . # For debugging.
-test -f test-suite.log
-test -f dir1/foo.log
-test -f dir2/dir3/foo.log
+cat > 3.am << 'END'
+TESTS =
+if COND
+if !COND2
+TESTS = x
+else
+## lineno 7
+TEST_EXTENSIONS = .foo
+endif
+endif
+END
+
+: > test-driver
+
+for i in 1 2 3; do
+  AUTOMAKE_fails $i
+  lineno=`sed -n 's/^## lineno //p' $i.am` \
+    && test 0 -lt "$lineno" \
+    || Exit 99
+  grep "^$i\\.am:$lineno:.*TEST_EXTENSIONS.*conditional content" stderr
+done
 
 :
diff --git a/tests/test-extensions.test b/tests/test-extensions.test
index 1d5872c..901d872b 100755
--- a/tests/test-extensions.test
+++ b/tests/test-extensions.test
@@ -24,29 +24,29 @@ parallel_tests=yes
 set -e
 
 cat >> configure.in <<'END'
-AC_SUBST([ext], [".e"])
 AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOCONF
 
-cat > Makefile.am << 'END'
-TESTS =
-TEST_EXTENSIONS = .sh .T .t1 ._foo .BAR .x_Y_z ._ @ext@
-END
+valid_extensions='sh T t1 _foo BAR x_Y_z _'
+
+echo TESTS = > Makefile.am
+echo " $valid_extensions" \
+  | sed -e 's/ / ./g' -e 's/^/TEST_EXTENSIONS =/' >> Makefile.am
+cat Makefile.am # For debugging.
 
 $AUTOMAKE
 
-$EGREP -i 'log|ext' Makefile.in # For debugging.
+grep -i 'log' Makefile.in # For debugging.
 
-for lc in sh T t1 _foo BAR x_Y_z _; do
+for lc in $valid_extensions; do
   uc=`echo $lc | tr '[a-z]' '[A-Z]'`
   $FGREP "\$(${uc}_LOG_COMPILER)" Makefile.in
   grep "^${uc}_LOG_COMPILE =" Makefile.in
   grep "^\.${lc}\.log:" Makefile.in
 done
-grep "address@hidden@\.log:" Makefile.in
 
 # The produced Makefile is not broken.
 ./configure
@@ -54,11 +54,12 @@ $MAKE all check
 
 cat > Makefile.am << 'END'
 TESTS = foo.test bar.sh
-TEST_EXTENSIONS = .test mu .x-y a-b .t.1 .sh .6c .0 .11 .@ .t33 .a=b _&_
+TEST_EXTENSIONS  = .test mu .x-y a-b .t.1 .sh .6c .0 .11 .= @suf@ 
address@hidden@
+TEST_EXTENSIONS += .= .t33 address@hidden _&_
 END
 
 AUTOMAKE_fails
-for suf in mu .x-y a-b .t.1 .6c .0 .11 '.@' '.a=b' '_&_'; do
+for suf in mu .x-y a-b .t.1 .6c .0 .11  @suf@ address@hidden@ '.=' '_&_'; do
   suf2=`printf '%s\n' "$suf" | sed -e 's/\./\\./'`
   $EGREP "^Makefile\.am:2:.*invalid test extension.* $suf2( |$)" stderr
 done
diff --git a/tests/uninstall-fail.test b/tests/uninstall-fail.test
index a3e7a7a..14a843b 100755
--- a/tests/uninstall-fail.test
+++ b/tests/uninstall-fail.test
@@ -24,6 +24,11 @@
 
 set -e
 
+mkdir d
+: > d/f
+chmod a-w d || skip "cannot make directories unwritable"
+rm -f d/f && skip_ "can delete files from unwritable directories"
+
 cat >> configure.in << 'END'
 AC_OUTPUT
 END
@@ -46,9 +51,6 @@ mkdir $inst $inst/share
 : > $inst/share/foobar.txt
 
 chmod a-w $inst/share
-touch $inst/share/t && skip_ "cannot make directories unwritable"
-rm -f $inst/share/t
-
 $MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
 cat output
 grep "rm: .*foobar\.txt" output
@@ -58,7 +60,8 @@ chmod a-rwx $inst/share
 
 $MAKE uninstall >output 2>&1 && { cat output; Exit 1; }
 cat output
-grep "cd: .*$inst/share" output
-
+# Some shells, like Solaris 10 /bin/sh and /bin/ksh, do not report
+# the name of the `cd' builtin upon a chdir error.
+$EGREP "(cd|sh): .*$inst/share" output
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]