automake-commit
[Top][All Lists]
Advanced

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

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


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-128-g57f5a61
Date: Sun, 24 Jun 2012 08:35:17 +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=57f5a614203a2bc62b0640d2296ed3c9de12958f

The branch, master has been updated
       via  57f5a614203a2bc62b0640d2296ed3c9de12958f (commit)
       via  3a7149594efc4ae7cd9f2b362baecde9d94e13f5 (commit)
       via  76fea2de5fa1e2f240e744ab067acb6db98480f7 (commit)
       via  d8024b510375dd4ea44fa15a24490c9885f722b4 (commit)
       via  f1e0300d38e7c79ec58a259c9c821d9469bb6c02 (commit)
      from  9465eb2651d9af30519882c4b583acc8ce91b8bb (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 57f5a614203a2bc62b0640d2296ed3c9de12958f
Merge: 9465eb2 3a71495
Author: Stefano Lattarini <address@hidden>
Date:   Sun Jun 24 10:12:43 2012 +0200

    Merge branch 'maint'
    
    * maint:
      tests: fix automatic re-execution of tests with Zsh
      tests: drop support for older Zsh shells
      tests: allow AM_TEST_RUNNER_SHELL to be overridden
      tests: fix setup for older Zsh
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 3a7149594efc4ae7cd9f2b362baecde9d94e13f5
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 23 13:42:10 2012 +0200

    tests: fix automatic re-execution of tests with Zsh
    
    * defs: Use '$argv0' instead of '$0'.  With Zsh not started right
    away in Bourne-compatibility mode, the latter will be the path not
    of the test script itself, but of the file it's currently sourcing
    -- i.e., in our case, './defs'.  This would cause the automatic
    re-execution code to execute './defs' (basically a no-op) rather
    than re-run the test correctly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 76fea2de5fa1e2f240e744ab067acb6db98480f7
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 23 11:16:08 2012 +0200

    tests: drop support for older Zsh shells
    
    * defs-static.in: Here.  The fact that such support has been broken for
    almost a year (only fixed by today's commit 'v1.12.1-57-gf1e0300'),
    causing no bug reports from anyone, shows that such support is not truly
    warranted.  And it will get in the way of future improvements in the
    handling of the exit trap (because bugs in older Zsh versions will
    prevent some of our planned improvements).  So just drop it.
    * t/README: Remove obsolete advice for working around bugs in older
    versions of Zsh; instead, indicate version 4.3 is the oldest Zsh now
    supported.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit d8024b510375dd4ea44fa15a24490c9885f722b4
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 23 10:39:33 2012 +0200

    tests: allow AM_TEST_RUNNER_SHELL to be overridden
    
    * defs-static.in: Here.  This will make it easier for the maintainer
    to run some self checks (like those in 't/self-check-exit.tap') with
    different shells, to look for possible portability problems.  Fix a
    typo (doubled "the") while we are at it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit f1e0300d38e7c79ec58a259c9c821d9469bb6c02
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jun 23 10:34:29 2012 +0200

    tests: fix setup for older Zsh
    
    * defs-static.in: After the addition of TAP-based tests and our renaming
    of "simple" test scripts from 'tests/foo.test' to 't/foo.sh', a test name
    is valid if it matches the wildcard "*.sh" or "*.tap", not the wildcard
    "*.test".  Adjust accordingly.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 defs           |   10 +++++-----
 defs-static.in |   41 ++++++++++++++---------------------------
 t/README       |   21 ++++-----------------
 3 files changed, 23 insertions(+), 49 deletions(-)

diff --git a/defs b/defs
index d16758c..72dcf63 100644
--- a/defs
+++ b/defs
@@ -32,8 +32,8 @@ case ${AM_TESTS_REEXEC-yes} in
     ;;
   *)
     # Ensure we can find ourselves.
-    if test ! -f "$0"; then
-      echo "$0: unable to find myself" >&2
+    if test ! -f "$argv0"; then
+      echo "$argv0: unable to find myself" >&2
       exit 99
     fi
     AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
@@ -46,10 +46,10 @@ case ${AM_TESTS_REEXEC-yes} in
       *x*) opts=-x;;
       *) opts=;;
     esac
-    echo exec $AM_TEST_RUNNER_SHELL $opts "$0" "$*"
-    exec $AM_TEST_RUNNER_SHELL $opts "$0" ${1+"$@"}
+    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 "$0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
+    echo "$argv0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
     exit 99
     ;;
 esac
diff --git a/defs-static.in b/defs-static.in
index 1dfd8d3..da5dcff 100644
--- a/defs-static.in
+++ b/defs-static.in
@@ -31,35 +31,22 @@ DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
-  # If Zsh is not started directly in Bourne-compatibility mode, it has
-  # some incompatibilities in the handling of $0 that conflict with
-  # our usage: i.e., $0 inside a file sourced with the '.' builtin is
-  # temporarily set to the name of the sourced file.
-  # Work around this when possible, otherwise abort the script.
+  # If Zsh is not started directly in POSIX-compatibility mode, it has some
+  # incompatibilities in the handling of $0 that conflict with our usage;
+  # i.e., $0 inside a file sourced with the '.' builtin is temporarily set
+  # to the name of the sourced file.  Work around that.
   # Note that a bug in some versions of Zsh prevents us from resetting $0
   # in a sourced script, so the use of $argv0.  For more info see:
-  #  <http://www.zsh.org/mla/workers/2009/msg01140.html>
-  # Note: the apparently useless 'eval' below are needed by at least
-  # dash 0.5.2, to prevent it from bailing out with an error like
-  # "Syntax error: Bad substitution"
-  if eval '[[ "$0" = *."test" ]]'; then
-    # Good, FUNCTION_ARGZERO option was already off when this file was
-    # sourced.  Thus we've nothing to do.
-    argv0=$0
-  elif eval 'test -n "${functrace[-1]}"'; then
-    # FUNCTION_ARGZERO option was on, but we have a easy workaround.
-    eval 'argv0=${functrace[-1]%:*}'
-  else
-    # Give up.
-    echo "$0: cannot determine the path of running test script" >&2
-    echo "$0: test was running with Zsh version $ZSH_VERSION" >&2
-    echo "$0: did you enable the NO_FUNCTION_ARGZERO option?" >&2
+  #   <http://www.zsh.org/mla/workers/2009/msg01140.html>
+  # The apparently useless 'eval' here is needed by at least dash 0.5.2,
+  # to prevent it from bailing out with an error like:
+  #   "Syntax error: Bad substitution".
+  eval 'argv0=${functrace[-1]%:*}' && test -f "$argv0" || {
+    echo "Cannot determine the path of running test script." >&2
+    echo "Your Zsh (version $ZSH_VERSION) is probably too old." >&2
     exit 99
-  fi
+  }
 else
   argv0=$0
   # Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
@@ -140,8 +127,8 @@ build_alias=${build_alias-'@build_alias@'}; export 
build_alias
 
 # The shell we use to run our own test scripts, determined at configure
 # time.  It is required in the self tests, and most importantly for the
-# the automatic re-execution of test scripts.
-AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'
+# automatic re-execution of test scripts.
+AM_TEST_RUNNER_SHELL=${AM_TEST_RUNNER_SHELL-'@AM_TEST_RUNNER_SHELL@'}
 
 # Make sure we override the user shell.  And do not read the value of
 # $SHELL from the environment (think to the non-uncommon situation where
diff --git a/t/README b/t/README
index 3f56400..43f7b71 100644
--- a/t/README
+++ b/t/README
@@ -105,23 +105,10 @@ Supported shells
   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, some care must be used with Zsh, since, when not directly
-  started in Bourne-compatibility mode, it has some incompatibilities
-  in the handling of $0 which conflict with our usage.  Our testsuite
-  can automatically work around these incompatibilities when a version
-  4.3 or later of Zsh is used, but unfortunately not when an older
-  version of Zsh is used.  Thus, if you want to run a test script, say
-  'foo.sh', with Zsh 4.2, you *can't* simply do "zsh foo.sh", but
-  you *must* resort to:
-
-    AM_TESTS_REEXEC=no zsh -o no_function_argzero foo.sh
-
-  Note that this problem does not occur if Zsh is executed through
-  a symlink with a basename of 'sh', since in that case Zsh starts
-  in Bourne compatibility mode.  So you should be perfectly safe
-  when /bin/sh is Zsh, even a it's version < 4.3.
+  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.
 
 
 Reporting failures


hooks/post-receive
-- 
GNU Automake



reply via email to

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