automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1-597-g316e64d
Date: Mon, 09 Jul 2012 11:28:09 +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=316e64d9acad05b566e60976e7ab971efa4038d0

The branch, ng/master has been updated
       via  316e64d9acad05b566e60976e7ab971efa4038d0 (commit)
       via  c1137f41140a3914d636bcf3a949e441161cc3f3 (commit)
       via  593315ead98c1ec94087fca8cc09ffa74dd0618d (commit)
       via  0b9f22b79ce82b8e18f77468a80737921d76aaf5 (commit)
       via  15b8b62ac20add6de8954053335487a7a492a462 (commit)
       via  ea93d8d05cf61d11a557e21b47f4736e337f6b1a (commit)
       via  cbd1a6049adbbc21081104a1cb7c2b793652106a (commit)
       via  5197aba1d5e1895c28d66703b0b407c991f608fb (commit)
       via  2d1f1043e900a746f57c34467d4de8b48e4efc8b (commit)
       via  a5edf3d61c28f0c9702dd012bf8d0623310e19c5 (commit)
       via  cca426348a05caf190c3ef60f2f54d1a590b4459 (commit)
       via  2634d5d8ba99a52023f25bb6ea6b038f76e55a7f (commit)
       via  fc21a888343751b9fbd2bc35fe1ffc96f4f310f2 (commit)
       via  b6e6409a68595fec2c9bf484b36f0a498bd18d87 (commit)
       via  3e4f53df611d0592a9f8d7b154a48573b2b29ae6 (commit)
       via  19d84bc34e9afa42aa41ae5c7815e49a8534927c (commit)
       via  14487be67a4d2e7cfcbda928c998e83a0bdbae96 (commit)
       via  56333a700c01893304f508d5d5516c524a32730b (commit)
       via  0451b0bc8bc991dc4f19d43a7aad82a0a509758e (commit)
       via  6eefb0a0bcce8c474fe10e7d4e5ace0e2ce57253 (commit)
      from  dafb5ba1769b3db01547646212b8c7babb408730 (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 316e64d9acad05b566e60976e7ab971efa4038d0
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jul 9 13:26:24 2012 +0200

    [ng] tests: fixed typo in comments in 'built-sources.sh'
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit c1137f41140a3914d636bcf3a949e441161cc3f3
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 8 10:22:45 2012 +0200

    [ng] tests: remove several 'using_gmake' calls
    
    In the Automake-NG testsuite, $MAKE is always GNU make.
    
    * t/parallel-tests9.sh: Don't call 'using_gmake'; assume
    it would unconditionally return true.
    * t/tap-recheck.sh: Likewise.
    * t/test-driver-custom-multitest-recheck.sh: Likewise.
    * t/test-driver-custom-multitest-recheck2.sh: Likewise.
    * t/test-metadata-recheck.sh: Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 593315ead98c1ec94087fca8cc09ffa74dd0618d
Merge: 0b9f22b 15b8b62
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 8 09:59:11 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      tests: move 'runtest' into the top-level directory
      cosmetics: rename t/ax/test-runner => t/ax/runtest
      fixup: another "make recheck" failure with BSD make
      test runner: work correctly in VPATH setups
      compat: automake should define $(mkdir_p), for backward compatibility
      coverage: test that AM_PROG_MKDIR_P and $(mkdir_p) still works
      tests init: don't automatically re-execute tests with a POSIX shell
      yacc tests: fix spurious failure with parallel make
      tests: ignore minor 'recheck' regression for BSD make
      tests: don't clutter the top-level dir with temporary test directories
      tests: avoid spurious failures when @MKDIR_P@ points to "install-sh -d"
      lisp: better support of VPATH builds
      news: fixlets and updates
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0b9f22b79ce82b8e18f77468a80737921d76aaf5
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jul 8 01:04:48 2012 +0200

    [ng] tests: fix spurious failures on NetBSD
    
    * t/built-sources.sh (Makefile.am): In a recipe, use 'printf', not 'echo',
    to print a string containing a "\n" sequence, because that is interpreted
    like a newline by the echo built-in of NetBSD 5.1 /bin/ksh.
    * t/maken.sh: Don't expect the timestamp of the current directory to be
    unchanged after "make -n" is run in it; this doesn't hold on NetBSD 5.1.
    Instead, make the current directory unwritable before running "make -n",
    to ensure attempts to modify the directory fail.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 .gitignore                                    |    1 +
 Makefile.am                                   |   16 ++-
 NEWS                                          |   34 +++-
 defs                                          |   38 +-----
 lib/am/header-vars.am                         |    5 +
 lib/am/lisp.am                                |    3 +-
 lib/elisp-comp                                |    4 +-
 runtest.in                                    |   62 +++++++
 t/README                                      |   45 +++---
 t/built-sources.sh                            |   14 +-
 t/{check6.sh => lisp-pr11806.sh}              |   35 ++---
 t/maken.sh                                    |    4 +-
 t/{dist-included-parent-dir.sh => mkdir_p.sh} |   32 ++--
 t/parallel-tests9.sh                          |   16 ++-
 t/self-check-cleanup.tap                      |  189 ---------------------
 t/self-check-dir.tap                          |    1 -
 t/self-check-exit.tap                         |    2 -
 t/self-check-explicit-skips.sh                |    1 -
 t/self-check-me.tap                           |   15 ++-
 t/self-check-reexec.tap                       |  216 -------------------------
 t/yacc-deleted-headers.sh                     |    2 +-
 21 files changed, 195 insertions(+), 540 deletions(-)
 create mode 100644 runtest.in
 copy t/{check6.sh => lisp-pr11806.sh} (68%)
 copy t/{dist-included-parent-dir.sh => mkdir_p.sh} (66%)
 delete mode 100755 t/self-check-cleanup.tap
 delete mode 100755 t/self-check-reexec.tap

diff --git a/.gitignore b/.gitignore
index 1ea4dbb..51a8b82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
 /configure.lineno
 /aclocal
 /automake
+/runtest
 /doc/.dirstamp
 /doc/automake*.info
 /doc/automake*.info-[0-9]
diff --git a/Makefile.am b/Makefile.am
index ada1fac..e0c1042 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -373,11 +373,6 @@ AM_TESTS_ENVIRONMENT = \
   ; do \
     eval test x"\$${$$v}" = x || unset $$v; \
   done;
-# The 'AM_TESTS_REEXEC=no' setting tells the tests not to needlessly
-# re-execute themselves with the shell detected at configure time, since
-# we are already running them under it explicitly in our setup (see e.g.
-# the definition of TEST_LOG_COMPILER above).
-AM_TESTS_ENVIRONMENT += AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC;
 # We want warning messages and explanations for skipped tests to go to
 # the console if possible, so set up 'stderr_fileno_' properly.
 AM_TESTS_FD_REDIRECT = 9>&2
@@ -415,6 +410,17 @@ defs-static: defs-static.in Makefile
 EXTRA_DIST += defs-static.in
 CLEANFILES += defs-static
 
+runtest: runtest.in Makefile
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN)in=runtest.in \
+         && $(MKDIR_P) t/ax \
+         && $(do_subst) <$(srcdir)/runtest.in >address@hidden \
+         && chmod a+x address@hidden
+       $(generated_file_finalize)
+EXTRA_DIST += runtest.in
+CLEANFILES += runtest
+noinst_SCRIPTS = runtest
+
 # If two test scripts have the same basename, they will end up sharing
 # the same log file, leading to all sort of undefined and undesired
 # behaviours.
diff --git a/NEWS b/NEWS
index dc2fdb3..d51a0af 100644
--- a/NEWS
+++ b/NEWS
@@ -16,10 +16,13 @@ New in 1.13:
     option) has been removed.  See discussion about automake bug#11034
     for more background.
 
-  - The automake-provided $(mkdir_p) make variable, @mkdir_p@ configure
-    time substitution and AM_PROG_MKDIR m4 macro have been removed.  They
-    had been obsolete since automake 1.10, and actively deprecated since
-    Automake 1.12.1.
+  - The automake-provided '@mkdir_p@' configure substitution and
+    AM_PROG_MKDIR m4 macro have been removed.  They had been obsolete
+    since automake 1.10, and actively deprecated since Automake 1.12.1.
+    However, to maintain a degree of backward-compatibility, the make
+    variable '$(mkdir_p)' is still defined (now simple as an alias to
+    '$(MKDIR_P)').  It will probably be removed in future major versions
+    of Automake (probably 1.14).
 
   - The deprecated aclocal option '--acdir' has been removed.  You
     should use the options '--automake-acdir' and '--system-acdir'
@@ -122,13 +125,20 @@ New in 1.12.2:
     option.
 
   - Support for the two- and three-arguments invocation forms of the
-    AM_INIT_AUTOMAKE macro will be deprecated in the next minor version
-    of Automake (1.12.1) and removed in the next major version (1.13).
+    AM_INIT_AUTOMAKE macro is deprecated, and will be removed in the
+    next major Automake version (1.13).
 
   - The exact order in which the directories in the aclocal macro
     search path are looked up is probably going to be changed in the
     next Automake release (1.13).
 
+  - The 'missing' script will not try anymore to update the timestamp
+    of out-of-date files that require a maintainer-specific tool to be
+    remade, in case the user lacks such a tool (or has a too-old version
+    of it).  In fact, starting from Automake 1.13, all it'll do will be
+    giving more useful warnings than a bare "command not found" from a
+    make recipe would.
+
 * Warnings and deprecations:
 
   - Automake now issues a warning (in the 'portability' category) if
@@ -168,6 +178,16 @@ Bugs fixed in 1.12.2:
     compilation fails, it will still be rerun by further "make recheck"
     invocations.  See automake bug#11791.
 
+* Bugs introduced by 1.12.1:
+
+  - Automake generated Makefiles define once again the $(mkdir_p) make
+    variable (simple ans an alias for $(MKDIR_P)), for better backward
+    compatibility.  The '@mkdir_p@' substitution is however not enabled
+    by default anymore; anyone needing it should call the AM_PROG_MKDIR
+    m4 macro explicitly (beware that this macro has been deprecated since
+    the previous Automake release 1.12.1, and will be removed in Automake
+    1.13).
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.12.1:
@@ -191,7 +211,7 @@ New in 1.12.1:
   - The long-obsolete (since 1.10) automake-provided $(mkdir_p) make
     variable, @mkdir_p@ configure-time substitution and AM_PROG_MKDIR
     m4 macro are deprecated, eliciting a warning in the 'obsolete'
-    category.  They will be removed in the next major version (1.13).
+    category.
 
 * Miscellaneous changes:
 
diff --git a/defs b/defs
index 087dc67..df85746 100644
--- a/defs
+++ b/defs
@@ -15,44 +15,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/>.
 
-# *** IMPORTANT NOTE ***
-# This file should execute correctly with any system's /bin/sh (which
-# might be just a Bourne shell, non POSIX-conforming, like on Solaris
-# up to version 11 at least).
-
 # Source the shell static setup and variable definitions.
-. ./defs-static
-test $? -eq 0 || exit 99
-
-# Make sure we run with the shell detected at configure time or forced
-# by the user (unless the user forbids it).  That is assumed to be a
-# proper POSIX shell.
-case ${AM_TESTS_REEXEC-yes} in
-  n|no|false|0)
-    ;;
-  *)
-    # Ensure we can find ourselves.
-    if test ! -f "$argv0"; then
-      echo "$me: unable to find myself: '$argv0'" >&2
-      exit 99
-    fi
-    AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-    # Cannot simply do "opts=$-", since the content of $- is not
-    # portable among different shells.  So try to propagate only
-    # the portable and interesting options.
-    case $- in
-      *x*v*|*v*x) opts=-vx;;
-      *v*) opts=-v;;
-      *x*) opts=-x;;
-      *) opts=;;
-    esac
-    echo exec $AM_TEST_RUNNER_SHELL $opts "$argv0" "$*"
-    exec $AM_TEST_RUNNER_SHELL $opts "$argv0" ${1+"$@"}
-    # This should be dead code, unless some strange error happened.
-    echo "$me: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
-    exit 99
-    ;;
-esac
+. ./defs-static; test $? -eq 0 || exit 99
 
 # Source the actual test initialization and setup code, and return
 # control to the test script that is sourcing us.
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index d2486b6..26716f4 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -277,6 +277,11 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+mkdir_p = $(MKDIR_P)
+
 ## dejagnu.am uses these variables.  Some users might rely on them too.
 ?BUILD?build_triplet = @build@
 ?HOST?host_triplet = @host@
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 81dc865..7b61e34 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -36,7 +36,8 @@ elc-stamp: $(LISP)
          done; \
 ## Finally call elisp-comp for all files.
          shift; \
-         EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \
+         abs_srcdir="$(abs_srcdir)" EMACS="$(EMACS)" $(SHELL) \
+           $(elisp_comp) "$$@" || exit 1; \
        else : ; fi
        @mv -f elc-temp $@
 
diff --git a/lib/elisp-comp b/lib/elisp-comp
index 64aae5a..6d5b7b4 100755
--- a/lib/elisp-comp
+++ b/lib/elisp-comp
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Copyright (C) 1995-2012 Free Software Foundation, Inc.
 
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2012-07-05.17; # UTC
 
 # Franc,ois Pinard <address@hidden>, 1995.
 #
@@ -75,7 +75,7 @@ cp "$@" $tempdir
 
 (
   cd $tempdir
-  echo "(setq load-path (cons nil load-path))" > script
+  echo "(setq load-path (cons nil (cons \"$abs_srcdir\" load-path)))" > script
   $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
   mv *.elc ..
 ) || exit $?
diff --git a/runtest.in b/runtest.in
new file mode 100644
index 0000000..31f8e01
--- /dev/null
+++ b/runtest.in
@@ -0,0 +1,62 @@
address@hidden@
+#
+# 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/>.
+
+# Run an Automake test from the command line.
+# Usage:
+
+set -e; set -u
+
+: ${AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'}
+: ${AM_PROVE_CMD='prove'}
+: ${AM_PROVEFLAGS='--merge --verbose'}
+: ${srcdir='@srcdir@'}
+
+error () { echo "$0: $*" >&2; exit 255; }
+
+# Some shell flags should be passed over to the test scripts.
+#while test $# -gt 0; do
+#  case $1 in
+#    --help) echo "Usage: $0 [SHELL-OPTIONS] TEST [TEST-OPTIONS]"; exit $?;;
+#    -*)
+#  esac
+#done
+
+test $# -gt 0 || error "missing argument"
+
+tst=$1; shift
+
+case $tst in
+   *.sh) wrapper () { exec "$@"; };;
+  *.tap) wrapper () { exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e "$@"; };;
+      *) error "test '$tst' has an unrecognized extension";;
+esac
+
+case $tst in
+  /*) ;;
+   *) if test -f ./$tst; then
+        tst=./$tst
+      # Support for VPATH build.
+      elif test -f $srcdir/$tst; then
+        tst=$srcdir/$tst
+      else
+        error "could not find test '$tst'"
+      fi
+      ;;
+esac
+
+wrapper "$AM_TEST_RUNNER_SHELL" "$tst" "$@"
+error "dead code reached"
diff --git a/t/README b/t/README
index b2dd870..50feafa 100644
--- a/t/README
+++ b/t/README
@@ -70,44 +70,37 @@ About the tests
   implemented as shell scripts).  The scripts with the '.sh' suffix
   are "simple" tests, their outcome completely determined by their
   exit status.  Those with the '.tap' suffix use the TAP protocol.
-  If you want to run a test by hand, you can do so directly if it is
-  a simple test:
 
-    ./t/nogzip.sh
+  If you want to run a test by hand, you should be able to do so using the
+  'runtest' script provided in the Automake distribution:
 
-  (it will be verbose by default), while if it is a TAP test you can pass
-  it to your preferred TAP runner, as in e.g.:
+      ./runtest t/nogzip.sh
+      ./runtest t/add-missing.tap
 
-    prove --verbose --merge ./t/add-missing.tap
-
-  The tests can also be run directly in a VPATH build, as with:
-
-    /path/to/srcdir/t/nogzip.sh
-    prove --verbose --merge /path/to/srcdir/t/add-missing.tap
+  This will run the test using the correct shell, and should also work in
+  VPATH builds.  Note that, to run the TAP tests this way, you'll need to
+  have the prove(1) utility available in $PATH.
 
 
 Supported shells
 ----------------
 
-  By default, the tests are run by the $SHELL detected at configure
-  time.  They also take care to re-execute themselves with that shell,
-  unless told not to.  So, to run the tests with a different shell, say
-  '/path/to/another/sh', the user must use:
-
-    AM_TESTS_REEXEC=no /path/to/another/sh ./t/foo.sh
-    AM_TESTS_REEXEC=no prove -v -e /path/to/another/sh ./t/bar.tap
+  By default, the tests are run by a proper shell detected at configure
+  time.  Here is how you can run the tests with a different shell, say
+  '/bin/my-sh':
 
-  to run a test directly, and:
+    # Running through the makefile test driver.
+    make check AM_TEST_RUNNER_SHELL=/bin/my-sh
 
-    make check LOG_COMPILER=/path/to/sh
+    # Run a test directly from the command line.
+    AM_TEST_RUNNER_SHELL=/bin/my-sh ./t/ax/runtest t/foo.sh
 
-  to run the test(s) through the makefile test driver.
 
-  The test scripts are written with portability in mind, so that they
-  should run with any decent Bourne-compatible shell.  However, it is
-  worth nothing that older versions of Zsh (pre-4.3) exhibited several
-  bugs and incompatibilities with our uses, and are thus not supported
-  for running Automake's test scripts.
+  The test scripts are written with portability in mind, and should run
+  with any decent POSIX shell.  However, it is worth nothing that older
+  versions of Zsh (pre-4.3) exhibited several bugs and incompatibilities
+  with our uses, and are thus not supported for running Automake's test
+  scripts.
 
 
 Reporting failures
diff --git a/t/built-sources.sh b/t/built-sources.sh
index 902cee1..9890916 100755
--- a/t/built-sources.sh
+++ b/t/built-sources.sh
@@ -29,12 +29,14 @@ BUILT_SOURCES = foo.c
 noinst_PROGRAMS = bar baz
 foo.c:
        rm -f $@ address@hidden
-       echo '#include <stdio.h>'               >  address@hidden
-       echo 'int main (void)'                  >> address@hidden
-       echo '{               '                 >> address@hidden
-       echo '  printf ("%s\n", FOOMSG);'       >> address@hidden
-       echo '  return 0;'                      >> address@hidden
-       echo '}'                                >> address@hidden
+       # Use printf, not echo, to avoid spurious interpretation of
+       # the "\n" as a newline (seen on NetBSD 5.1).
+       printf '%s\n' '#include <stdio.h>'               >  address@hidden
+       printf '%s\n' 'int main (void)'                  >> address@hidden
+       printf '%s\n' '{               '                 >> address@hidden
+       printf '%s\n' '  printf ("%s\n", FOOMSG);'       >> address@hidden
+       printf '%s\n' '  return 0;'                      >> address@hidden
+       printf '%s\n' '}'                                >> address@hidden
        mv -f address@hidden $@
 CLEANFILES = foo.c
 END
diff --git a/t/check6.sh b/t/lisp-pr11806.sh
similarity index 68%
copy from t/check6.sh
copy to t/lisp-pr11806.sh
index d885713..c372ea5 100755
--- a/t/check6.sh
+++ b/t/lisp-pr11806.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# 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
@@ -14,41 +14,38 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for PR 400: XFAIL_TESTS delimited by TABs.
-# Also test that Solaris make VPATH rewriting is honored
+# Compiling .el files that requires each other in a VPATH build.
+# See automake bug#11806.
 
-# For gen-testsuite-part: ==> try-with-serial-tests <==
+required=emacs
 . ./defs || exit 1
 
 cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TESTS = $(XFAIL_TESTS)
-XFAIL_TESTS = a        b       c
+lisp_LISP = foo.el
+lisp_DATA = bar.el
 END
 
-cat >>a <<'END'
-#! /bin/sh
-exit 1
-END
-
-cp a b
-cp a c
-
-chmod a+x a b c
+echo "(require 'bar)" > foo.el
+echo "(provide 'bar)" > bar.el
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure
-$MAKE check
-$MAKE distclean
 mkdir build
 cd build
 ../configure
-$MAKE check
+$MAKE
+test -f foo.elc
+cd ..
+
+./configure
+$MAKE
+test -f foo.elc
 
 :
diff --git a/t/maken.sh b/t/maken.sh
index ec992bf..e4254e5 100755
--- a/t/maken.sh
+++ b/t/maken.sh
@@ -50,10 +50,12 @@ $AUTOMAKE
 for target in dist distcheck; do
   echo stamp > stampfile
   $sleep
+  chmod a-w .
   $MAKE -n $target
   $MAKE -n $target | grep stamp-sub-dist-hook
+  chmod u+w .
   # No file has been actually touched or created.
-  is_newest stampfile $(find .)
+  is_newest stampfile $(find . | grep -v '^\.$')
   $MAKE test-no-distdir
 done
 
diff --git a/t/dist-included-parent-dir.sh b/t/mkdir_p.sh
similarity index 66%
copy from t/dist-included-parent-dir.sh
copy to t/mkdir_p.sh
index aed1051..624365c 100755
--- a/t/dist-included-parent-dir.sh
+++ b/t/mkdir_p.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# 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
@@ -14,7 +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/>.
 
-# Make sure included files in parent directory are distributed.
+# AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
+# compatibility.
 
 . ./defs || exit 1
 
@@ -25,27 +26,26 @@ END
 
 cat > Makefile.am << 'END'
 SUBDIRS = sub
-test: distdir
-       test -f $(distdir)/foo
-       test -f $(distdir)/bar
-       test 2 -gt `find $(distdir)/sub -type d | wc -l`
+all-local:
+       $(mkdir_p) . dir1/dir2
+check-local: all
+       test -d dir1/dir2
+       test -d dir1/dir3
 END
 
-: > foo
-: > bar
-
 mkdir sub
 cat > sub/Makefile.am << 'END'
-include $(top_srcdir)/foo
-include ../bar
+# '$(mkdir_p)' should continue to work even in subdir makefiles.
+all-local:
+       $(mkdir_p) .. ../dir1/dir3
 END
 
 $ACLOCAL
-$AUTOCONF
+$AUTOCONF -Werror -Wall
 $AUTOMAKE
-# Use --srcdir with an absolute path because it's harder
-# to support in 'distdir'.
-./configure --srcdir "$(pwd)"
-$MAKE test
+
+./configure
+$MAKE check-local
+$MAKE distcheck
 
 :
diff --git a/t/parallel-tests9.sh b/t/parallel-tests9.sh
index 583c674..d9f9479 100755
--- a/t/parallel-tests9.sh
+++ b/t/parallel-tests9.sh
@@ -59,12 +59,16 @@ $MAKE check >stdout && { cat stdout; exit 1; }
 cat stdout
 count_test_results total=3 pass=1 fail=1 skip=0 xfail=0 xpass=0 error=1
 
-$MAKE recheck >stdout && { cat stdout; exit 1; }
-cat stdout
-count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
-grep 'foo\.test' stdout && exit 1
-grep '^ERROR: bar\.test$' stdout
-grep '^FAIL: baz\.test$' stdout
+# Running this two times in a row should produce the same results the
+# second time.
+for i in 1 2; do
+  $MAKE recheck >stdout && { cat stdout; exit 1; }
+  cat stdout
+  count_test_results total=2 pass=0 fail=1 skip=0 xfail=0 xpass=0 error=1
+  grep 'foo\.test' stdout && exit 1
+  grep '^ERROR: bar\.test$' stdout
+  grep '^FAIL: baz\.test$' stdout
+done
 
 # Ensure that recheck builds check_SCRIPTS, and that
 # recheck reruns nothing if check has not been run.
diff --git a/t/self-check-cleanup.tap b/t/self-check-cleanup.tap
deleted file mode 100755
index 2c5a9a9..0000000
--- a/t/self-check-cleanup.tap
+++ /dev/null
@@ -1,189 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-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/>.
-
-# Sanity check for the automake testsuite.
-# Check creation/removal of temporary test working directory by './defs'.
-
-. ./defs || exit 1
-
-plan_ 43
-
-# We still need a little hack to make ./defs work outside automake's
-# tree 'tests' subdirectory.  Not a big deal.
-sed "s|^am_top_builddir=.*|am_top_builddir='$(pwd)'|" \
-  "$am_top_builddir"/defs-static >defs-static
-diff "$am_top_builddir"/defs-static defs-static \
-  && fatal_ "failed to edit defs-static"
-cp "$am_top_builddir"/defs .
-
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-keep_testdirs=; unset keep_testdirs
-
-if ln -s defs foo && test -h foo; then
-  have_symlinks=yes
-else
-  have_symlinks=no
-fi
-export have_symlinks # Is used also by spawned shells.
-
-# Don't let a failure poison all subsequent tests.
-do_clean_setup ()
-{
-  # Don't try to be smart and use find here, that has caused issues
-  # and extra ERROR results in the past.  Be dumb and safe.
-  for d in t t/* t/*/* t/*/*/*; do
-    test ! -d $d || chmod u+rwx $d || :
-  done
-  rm -rf t
-}
-
-do_clean_setup
-
-# Exporting 'keep_testdirs' to "yes" in the environment should cause
-# the cleanup code not to be run, so that the temporary directories
-# are left on disk.
-command_ok_ '"keep_testdirs=yes" causes testdir to be kept around' eval '
-     env keep_testdirs=yes \
-       $AM_TEST_RUNNER_SHELL -c ". ./defs && echo okok >foo" t/dummy.sh \
-     && test -f t/dummy.dir/foo \
-     && test okok = $(cat t/dummy.dir/foo)'
-
-do_clean_setup
-
-# Check that pre-test cleanup works also with directories with
-# "null" permissions, and containing broken symlinks.
-mkdir t t/dummy.dir t/dummy.dir/sub
-(
-  cd t/dummy.dir
-  touch file sub/file
-  if test $have_symlinks = yes; then
-    ln -s file symlink
-    ln -s none brokenlink
-  fi
-)
-chmod 000 t/dummy.dir/sub/* t/dummy.dir/file
-test $have_symlinks = yes && chmod 000 t/dummy.dir/symlink
-chmod 500 t/dummy.dir/sub t/dummy.dir
-command_ok_ "pre-cleanup can deal with low-perms testdir" \
-            $AM_TEST_RUNNER_SHELL -c  '. ./defs' t/dummy.sh
-command_ok_ "pre-cleanup removed low-perms testdir" \
-            test ! -e t/dummy.dir
-
-do_clean_setup
-
-# Check that post-test cleanup works also with directories with
-# "null" permissions, and containing broken symlinks.
-command_ok_ "post-cleanup can deal with low-perms testdir" \
-            $AM_TEST_RUNNER_SHELL -c  '
-  stderr_fileno_=2
-  . ./defs || exit 1
-  set -e
-  mkdir dir dir/sub
-  cd dir
-  touch file sub/file
-  if test $have_symlinks = yes; then
-    ln -s file symlink
-    ln -s none brokenlink
-  fi
-  cd ..
-  chmod 000 dir/sub/* dir/file
-  test $have_symlinks = yes && chmod 000 dir/symlink
-  chmod 500 dir/sub dir
-  :
-' t/dummy.sh
-command_ok_ "post-cleanup removed null-perms testdir" \
-            test ! -e t/dummy.dir
-
-do_clean_setup
-
-# Check that pre-test cleanup does not unduly change the permissions of
-# files to which symlinks in the temporary test directory point to.
-if test $have_symlinks = yes; then
-
-  mkdir dir
-  chmod 000 dir
-  : > file
-  chmod 000 file
-
-  mkdir t t/dummy.dir
-  (cd t/dummy.dir && ln -s ../../dir ../../file .)
-
-  command_ok_ "pre-cleanup with testdir with zero-perms symlinks" \
-               $AM_TEST_RUNNER_SHELL -c '. ./defs' t/dummy.sh
-  ls -l # For debugging.
-  command_ok_ "pre-cleanup chmod doesn't follow symlinks to files" \
-               eval 'ls -l file | grep "^----------.*file"'
-  command_ok_ "pre-cleanup chmod doesn't follow symlinks to dirs" \
-              eval 'ls -ld dir | grep "^d---------.*dir"'
-
-  command_ok_ "post-cleanup with testdir with zero-perms symlinks" \
-              $AM_TEST_RUNNER_SHELL -c '
-    ocwd=$(pwd) || exit 1
-    stderr_fileno_=2
-    . ./defs || exit 1
-    ln -s "$ocwd/dir" "$ocwd/file" .
-  ' t/dummy.sh
-  ls -l # For debugging.
-  command_ok_ "post-cleanup chmod doesn't follow symlinks to files" \
-               eval 'ls -l file | grep "^----------.*file"'
-  command_ok_ "post-cleanup chmod doesn't follow symlinks to dirs" \
-              eval 'ls -ld dir | grep "^d---------.*dir"'
-
-  chmod u+rwx dir file
-  rmdir dir
-  rm -f file
-
-else # $have_symlinks = no
-  skip_row_ 6 "symlinks not supported"
-fi
-
-do_clean_setup
-
-# Check that the cleanup trap does not remove the temporary
-# test directory in case of test failure, skip, hard-error,
-# or when receiving a signal.
-
-for st in 1 2 3 10 77 99 126 127 130 255; do
-  command_ok_ "exit trap doesn't clobber exit status $st" \
-              not $AM_TEST_RUNNER_SHELL -c "
-    stderr_fileno_=2
-    . ./defs
-    : > foo
-    exit $st
-  " t/dummy.sh
-  command_ok_ "testdir not removed if exiting with status $st" \
-              test -f t/dummy.dir/foo
-  do_clean_setup
-done
-
-for sig in 1 2 3 9 13 15; do
-  if is_blocked_signal $sig; then
-    skip_row_ 2 -r "signal $sig seems blocked"
-    continue
-  fi
-  command_ok_ "exit trap doesn't clobber signal $sig" \
-              not $AM_TEST_RUNNER_SHELL -c "
-    stderr_fileno_=2
-    . ./defs
-    : > foo
-    kill -$sig \$\$
-  " t/dummy.sh
-  command_ok_ "testdir not removed if getting signal $sig" \
-              test -f t/dummy.dir/foo
-  do_clean_setup
-done
-
-:
diff --git a/t/self-check-dir.tap b/t/self-check-dir.tap
index 4a228d7..48dbc0e 100755
--- a/t/self-check-dir.tap
+++ b/t/self-check-dir.tap
@@ -24,7 +24,6 @@ am_create_testdir=no
 
 plan_ 5
 
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
 keep_testdirs=; unset keep_testdirs
 
 # This needs to be consistent with what $AM_TEST_RUNNER_SHELL
diff --git a/t/self-check-exit.tap b/t/self-check-exit.tap
index 4bc6710..0fbc9d8 100755
--- a/t/self-check-exit.tap
+++ b/t/self-check-exit.tap
@@ -29,8 +29,6 @@ plan_ 34
 # so that false positives remain very unlikely.
 set +e
 
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-
 # It's especially important that the 'unset' is done before sourcing
 # ./defs, i.e., when 'set -e' is not active yet, for the benefit of shells
 # (like Bash 2.05 and Solaris 10 /bin/ksh) that returns a non-zero status
diff --git a/t/self-check-explicit-skips.sh b/t/self-check-explicit-skips.sh
index fa1626e..24687a8 100755
--- a/t/self-check-explicit-skips.sh
+++ b/t/self-check-explicit-skips.sh
@@ -24,7 +24,6 @@ am_create_testdir=no
 set +e
 
 unset am_explicit_skips stderr_fileno_
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
 
 # FIXME: this can be simplified when we improve our runtime checks on the
 # testsuite shell to ensure it supports "VAR=val shell_func" correctly.
diff --git a/t/self-check-me.tap b/t/self-check-me.tap
index 717fe2e..9c3125e 100755
--- a/t/self-check-me.tap
+++ b/t/self-check-me.tap
@@ -22,8 +22,6 @@ am_create_testdir=no
 
 plan_ 12
 
-AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
-
 # This test becomes cumbersome if we keep the 'errexit' shell flag set.
 # And removing it is no big deal, as this test is a TAP-based one, so
 # that false positives remain very unlikely.
@@ -31,7 +29,11 @@ set +e
 
 do_check ()
 {
-  $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' "$1" | grep "^me=$2$"
+  $AM_TEST_RUNNER_SHELL -c '
+    am_create_testdir=no # Do not pollute the top-level directory.
+    . ./defs
+    echo me=$me
+  ' "$1" | grep "^me=$2$"
   command_ok_ "me=$1" test $? -eq 0
 }
 
@@ -47,7 +49,12 @@ do_check abc. 'abc\.'
 
 # A definition of $me in the environment should be ignored.
 
-s=$(me=bad $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' foo.sh)
+s=$(me=bad $AM_TEST_RUNNER_SHELL -c '
+  # Do not pollute the top-level directory.
+  am_create_testdir=no
+  . ./defs
+  echo me=$me
+' foo.sh)
 command_ok_ "override of \$me before ./defs causes no error" \
             test $? -eq 0
 
diff --git a/t/self-check-reexec.tap b/t/self-check-reexec.tap
deleted file mode 100755
index f46797f..0000000
--- a/t/self-check-reexec.tap
+++ /dev/null
@@ -1,216 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2011-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/>.
-
-# Sanity check for the automake testsuite.
-# Check that automatic re-execution of test script with the
-# configure-time $AM_TEST_RUNNER_SHELL.
-
-am_create_testdir=empty
-. ./defs || exit 1
-
-plan_ 32
-
-unset AM_TESTS_REEXEC BASH_VERSION || :
-
-cwd=$(pwd) || fatal_ "getting current working directory"
-cp "$am_top_builddir"/defs . || fatal_ "fetching 'defs' from top_builddir"
-
-#
-# Search for required bash and non-bash shells.
-#
-
-for bash_shell in \
-  "$SHELL" "$AM_TEST_RUNNER_SHELL" bash bash3 bash4 :
-do
-  test "$bash_shell" = : && break
-  $bash_shell --version || continue
-  $bash_shell -c 'test -n "$BASH_VERSION"' || continue
-  break
-done
-
-# This might not be optimal, but it's much better than writing wrapper
-# scripts acting as "fake" shells.
-for non_bash_shell in \
-  /bin/sh /bin/ksh sh ksh ash dash pdksh "$SHELL" "$AM_TEST_RUNNER_SHELL" :
-do
-  test "$non_bash_shell" = : && break
-  $non_bash_shell -c 'exit 0' || continue
-  # Be sure to reject also any shell that is Zsh "in disguise" (as can
-  # be found on some Debian systems, where /bin/ksh can be symlinked to
-  # /bin/zsh4).  This is required because our testsuite does not support
-  # older versions of Zsh, and that has caused spurious failures in the
-  # past.
-  $non_bash_shell -c 'test -n "$ZSH_VERSION$BASH_VERSION"' && continue
-  break
-done
-
-echo "bash_shell='$bash_shell'"
-echo "non_bash_shell='$non_bash_shell'"
-
-# This would denote an internal error.
-if test "$bash_shell" = : && test "$non_bash_shell" = :; then
-  fatal_ "we couldn't find a bash shell nor a non-bash one"
-fi
-
-#
-# Functions used throughout the test.
-#
-
-get_ddata ()
-{
-  case $1 in
-    ""|*/) dsep=;;
-        *) dsep=/;;
-  esac
-  case $1 in
-    "") dname="no dir";;
-    /*) dname="absolute dir";;
-     *) dname="dir '$1'";;
-  esac
-}
-
-get_sh ()
-{
-  case $1 in
-    bash) sh=$bash_shell;;
-    non-bash) sh=$non_bash_shell;;
-    *) fatal_ "get_sh: invalid shell type '$1'";;
-  esac
-}
-
-#
-# Check how to default, force or prevent a re-execution.
-#
-
-cat > need-bash.sh <<'END'
-#!/bin/false
-. ./defs
-# Ensure that the script gets re-executed with bash.  Also ensure that
-# non-standard syntax used after the inclusion of './defs' doesn't cause
-# non-bash shells to fail.
-# Subshell required to prevent some shells (e.g., Solaris 10 /bin/sh)
-# from only complaining on stderr but then exiting with exit status 0.
-(foo=abac && test xbxc = ${foo//a/x} && test -n "$BASH_VERSION")
-END
-
-sh_var=AM_TEST_RUNNER_SHELL
-sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd'|" \
-    -e "s|^$sh_var=.*$|$sh_var=bash; export $sh_var|" \
-    < "$am_top_builddir"/defs-static >defs-static
-
-do_reexec ()
-{
-  command_ok_ "re-exec if AM_TESTS_REEXEC=$1" \
-              env AM_TESTS_REEXEC="$1" $non_bash_shell need-bash.sh
-}
-
-dont_reexec ()
-{
-  command_ok_ "don't re-exec if AM_TESTS_REEXEC=$1" \
-              not env AM_TESTS_REEXEC="$1" $non_bash_shell need-bash.sh
-}
-
-if test "$bash_shell" = :; then
-  skip_row_ 10 -r "no bash shell found" AM_TESTS_REEXEC
-elif test "$non_bash_shell" = :; then
-  skip_row_ 10 -r "no non-bash shell found" AM_TESTS_REEXEC
-else
-  command_ok_ "re-exec if AM_TESTS_REEXEC unset" \
-              $non_bash_shell need-bash.sh
-  do_reexec ''
-  do_reexec yes
-  do_reexec y
-  do_reexec true
-  do_reexec 1
-  dont_reexec no
-  dont_reexec n
-  dont_reexec false
-  dont_reexec 0
-fi
-
-#
-# Check message about the re-execution.  Also check that arguments passed
-# to a test script are preserved by a re-exec, even in "corner" cases.
-#
-
-cat > dummy.sh <<'END'
-#!/bin/sh
-. ./defs
-:
-END
-
-cat > checkargs.sh <<'END'
-. ./defs
-test $# -eq 3 && test x"$1" = x'a' && test x"$2" = x && test x"$3" = x"-e"
-END
-
-chmod a+x dummy.sh checkargs.sh
-
-mkdir sub
-cp dummy.sh checkargs.sh defs sub
-sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd'|" \
-    <  "$am_top_builddir"/defs-static > defs-static
-sed -e "s|^am_top_builddir=.*|am_top_builddir='$cwd/sub'|" \
-    <  "$am_top_builddir"/defs-static > sub/defs-static
-
-check_preserve_args ()
-{
-  dir=$1; shift
-  get_ddata "$dir"
-  $sh "${dir}${dsep}checkargs.sh" a '' -e && r='ok' || r='not ok'
-  result_ "$r" "$sh re-exec preserving args [$dname]"
-}
-
-check_reexec_message ()
-{
-  dir=$1; shift
-  get_ddata "$dir"
-  $sh "${dir}${dsep}dummy.sh" "$@" \
-    | grep "^exec $AM_TEST_RUNNER_SHELL ${dir}${dsep}dummy\\.sh $*\$" \
-    && r='ok' || r='not ok'
-  result_ "$r" "$sh display re-exec message [$dname] [args: $*]"
-}
-
-./dummy.sh a b \
-  | grep "^exec $AM_TEST_RUNNER_SHELL \\./dummy\\.sh a b$" \
-  && r='ok' || r='not ok'
-result_ "$r" "direct run display re-exec message [args: a b]"
-
-./checkargs.sh a '' -e && r='ok' || r='not ok'
-result_ "$r" "direct re-exec preserving args"
-
-for sh_type in non-bash bash; do
-  get_sh $sh_type
-  if test "$sh" = :; then
-    skip_row_ 5 -r "no $sh_type shell available" "re-exec message"
-    skip_row_ 5 -r "no $sh_type shell available" "re-exec preserving args"
-    continue
-  fi
-  check_preserve_args ''
-  check_reexec_message '' a b c
-  check_preserve_args .
-  check_reexec_message .  a b c
-  cd sub
-  check_preserve_args ..
-  check_reexec_message .. a b c
-  cd ..
-  check_preserve_args "$cwd"
-  check_reexec_message "$cwd" a -b c-
-  check_preserve_args sub
-  check_reexec_message sub 1 2 3 4
-done
-
-:
diff --git a/t/yacc-deleted-headers.sh b/t/yacc-deleted-headers.sh
index e02ae39..72965b4 100755
--- a/t/yacc-deleted-headers.sh
+++ b/t/yacc-deleted-headers.sh
@@ -44,7 +44,7 @@ BUILT_SOURCES = parse1.h p2-parse2.h
 # should be able to just declare dependencies directly instead
 # of relying on the BUILT_SOURCES hack, and things should still
 # work correctly.
address@hidden@: parse3.h
address@hidden@ address@hidden@: parse3.h
 
 .PHONY: clean-p3 build-p3
 build-p3: p3$(EXEEXT)


hooks/post-receive
-- 
GNU Automake



reply via email to

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