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-15


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-154-g5d99776
Date: Thu, 28 Jun 2012 16:50:03 +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=5d99776ce05b7a954ccf30d7ed666494c0db4e91

The branch, master has been updated
       via  5d99776ce05b7a954ccf30d7ed666494c0db4e91 (commit)
       via  073216069b0f94ce4a92f5a007c953152c896424 (commit)
       via  b0df891f28bb86a953e52c31bc782c9a325e8130 (commit)
      from  60a69375f9802af288ccc82ca4c15b85ce869e28 (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 5d99776ce05b7a954ccf30d7ed666494c0db4e91
Merge: 60a6937 0732160
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 28 18:38:02 2012 +0200

    Merge branch 'maint'
    
    * maint:
      tests init: don't bother allowing '$me' to be overridable
      tests init: typofixes in comments
    
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 Makefile.am                   |    1 -
 defs                          |    4 ++--
 defs-static.in                |   12 +++++++++---
 t/ax/test-init.sh             |   15 +--------------
 t/self-check-env-sanitize.tap |    3 +--
 t/self-check-me.tap           |   27 +++++++--------------------
 6 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 872714e..9e5512e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -330,7 +330,6 @@ TESTS = ## Will be updated later.
 # test scripts, but not from the environment.
 AM_TESTS_ENVIRONMENT = \
   for v in \
-    me \
     required \
     am_using_tap \
     am_serial_tests \
diff --git a/defs b/defs
index 72dcf63..087dc67 100644
--- a/defs
+++ b/defs
@@ -33,7 +33,7 @@ case ${AM_TESTS_REEXEC-yes} in
   *)
     # Ensure we can find ourselves.
     if test ! -f "$argv0"; then
-      echo "$argv0: unable to find myself" >&2
+      echo "$me: unable to find myself: '$argv0'" >&2
       exit 99
     fi
     AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
@@ -49,7 +49,7 @@ case ${AM_TESTS_REEXEC-yes} in
     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 "$argv0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
+    echo "$me: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
     exit 99
     ;;
 esac
diff --git a/defs-static.in b/defs-static.in
index da5dcff..781571c 100644
--- a/defs-static.in
+++ b/defs-static.in
@@ -53,11 +53,17 @@ else
   case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
 fi
 
+# The name of the current test (without the '.sh' or '.tap' suffix).
+me=${argv0##*/} # Strip all directory components.
+case $me in     # Strip test suffix.
+   *.tap) me=${me%.tap};;
+    *.sh) me=${me%.sh} ;;
+ esac
+
 # Check that the environment is properly sanitized.
 # Having variables exported to the empty string is OK, since our code
 # treats such variables as if they were unset.
 for var in \
-  me \
   required \
   am_using_tap \
   am_serial_tests \
@@ -68,7 +74,7 @@ for var in \
   am_original_ACLOCAL \
 ; do
   if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then
-    echo "$argv0: variable '$var' is set in the environment:" \
+    echo "$me: variable '$var' is set in the environment:" \
          "this is unsafe" >&2
     exit 99
   fi
@@ -113,7 +119,7 @@ case ${am_running_installcheck:=no} in
     am_system_acdir=$am_top_srcdir/m4/acdir
     ;;
   *)
-    echo "$argv0: variable 'am_running_installcheck' has invalid"
+    echo "$me: variable 'am_running_installcheck' has invalid"
          "value '$am_running_installcheck'" >&2
     exit 99
     ;;
diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh
index f6d57ef..e992d53 100644
--- a/t/ax/test-init.sh
+++ b/t/ax/test-init.sh
@@ -22,19 +22,6 @@
 # Enable the errexit shell flag early.
 set -e
 
-# The name of the current test (without the '.sh' or '.tap' suffix).
-# Test scripts can override it if they need to (but this should
-# be done carefully).
-if test -z "$me"; then
-  # Strip all directory components.
-  me=${argv0##*/}
-  # Strip test suffix.
-  case $me in
-    *.tap) me=${me%.tap};;
-     *.sh) me=${me%.sh} ;;
-  esac
-fi
-
 
 ## --------------------- ##
 ##  Early sanity checks. ##
@@ -990,7 +977,7 @@ else
   test -d t || mkdir t
   mkdir $testSubDir \
     || framework_failure_ "creating test subdirectory"
-  # The trailing './'ris to avoid CDPATH issues.
+  # The leading './' is to avoid CDPATH issues.
   cd ./$testSubDir \
     || framework_failure_ "cannot chdir into test subdirectory"
   if test x"$am_create_testdir" != x"empty"; then
diff --git a/t/self-check-env-sanitize.tap b/t/self-check-env-sanitize.tap
index 4169998..3e48d89 100755
--- a/t/self-check-env-sanitize.tap
+++ b/t/self-check-env-sanitize.tap
@@ -24,10 +24,9 @@ am_create_testdir=no
 set -x
 exec 5>&1
 
-plan_ 18 # Two times the number of variable names in $vars.
+plan_ 16 # Two times the number of variable names in $vars.
 
 vars='
-  me
   required
   am_serial_tests
   am_using_tap
diff --git a/t/self-check-me.tap b/t/self-check-me.tap
index bd75fa9..717fe2e 100755
--- a/t/self-check-me.tap
+++ b/t/self-check-me.tap
@@ -15,13 +15,12 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Make sure that $me gets automatically defined by './defs', and that it
-# can be overridden by the test script.
+# Make sure that $me gets automatically defined by './defs'.
 
 am_create_testdir=no
 . ./defs || exit 1
 
-plan_ 14
+plan_ 12
 
 AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
 
@@ -46,28 +45,16 @@ done
 do_check foo.bar 'foo\.bar'
 do_check abc. 'abc\.'
 
-# If we override $me, ./defs should not modify it.
+# A definition of $me in the environment should be ignored.
 
-s=$($AM_TEST_RUNNER_SHELL -c 'me=foo.sh && . ./defs && echo me=$me' bad.sh)
+s=$(me=bad $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' foo.sh)
 command_ok_ "override of \$me before ./defs causes no error" \
             test $? -eq 0
 
 r='ok'
-printf '%s\n' "$s" | grep '^me=foo\.sh$' || r='not ok'
-printf '%s\n' "$s" | grep 'me=bad'       && r='not ok'
-result_ "$r" "override of \$me before ./defs is honored"
-unset r
-
-# Overriding $me after sourcing ./defs-static should work.
-s=$($AM_TEST_RUNNER_SHELL -c '. ./defs-static && me=zardoz &&
-                              . ./defs && echo me=$me' bad.sh)
-command_ok_ "override of \$me after ./defs-static causes no error" \
-            test $? -eq 0
-
-r='ok'
-printf '%s\n' "$s" | grep '^me=zardoz$' || r='not ok'
-printf '%s\n' "$s" | grep 'me=bad'      && r='not ok'
-result_ "$r" "override of \$me after ./defs-static is honored"
+printf '%s\n' "$s" | grep '^me=foo$' || r='not ok'
+printf '%s\n' "$s" | grep 'me=bad'   && r='not ok'
+result_ "$r" "\$me from the environment is ignored"
 unset r
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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