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.11-785-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-785-g942379c
Date: Tue, 19 Apr 2011 21:03:04 +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=942379cc3862ca20003ccea44edff90e6a13b314

The branch, master has been updated
       via  942379cc3862ca20003ccea44edff90e6a13b314 (commit)
       via  986c68e702f191e05b09e580e6170502b4acf65a (commit)
       via  2aed42f2d3a4aeb938408ffc64859def583b25d5 (commit)
       via  9b5a8552fec112499a527a8af8577a9b76144435 (commit)
      from  feed175be52b073541b607f07059b4ea17a6abcd (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 942379cc3862ca20003ccea44edff90e6a13b314
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 19 22:57:39 2011 +0200

    tests: in self-checks, use $SHELL, not /bin/sh
    
    * tests/self-check-me-in-env.test: Include `./defs-static' to get
    the definition of `$SHELL'.  Use `$SHELL' instead of `/bin/sh' to
    execute the tests.

commit 986c68e702f191e05b09e580e6170502b4acf65a
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 19 22:52:54 2011 +0200

    tests: prefer AM_TESTS_ENVIRONMENT to TESTS_ENVIRONMENT
    
    * tests/Makefile.am (TESTS_ENVIRONMENT): Renamed to ...
    (AM_TESTS_ENVIRONMENT): ... this.

commit 2aed42f2d3a4aeb938408ffc64859def583b25d5
Merge: feed175 9b5a855
Author: Stefano Lattarini <address@hidden>
Date:   Tue Apr 19 22:47:48 2011 +0200

    Merge branch 'me-override-fix'

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

Summary of changes:
 ChangeLog                                          |   22 +++++++++++++++
 tests/Makefile.am                                  |    5 +++
 tests/Makefile.in                                  |    5 +++
 tests/defs                                         |    3 ++
 ...ck-is_newest.test => self-check-me-in-env.test} |   28 +++++--------------
 5 files changed, 43 insertions(+), 20 deletions(-)
 copy tests/{self-check-is_newest.test => self-check-me-in-env.test} (69%)

diff --git a/ChangeLog b/ChangeLog
index a84daca..6aeafd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2011-04-19  Stefano Lattarini  <address@hidden>
+
+       tests: in self-checks, use $SHELL, not /bin/sh
+       * tests/self-check-me-in-env.test: Include `./defs-static' to get
+       the definition of `$SHELL'.  Use `$SHELL' instead of `/bin/sh' to
+       execute the tests.
+
+2011-04-19  Stefano Lattarini  <address@hidden>
+
+       tests: prefer AM_TESTS_ENVIRONMENT to TESTS_ENVIRONMENT
+       * tests/Makefile.am (TESTS_ENVIRONMENT): Renamed to ...
+       (AM_TESTS_ENVIRONMENT): ... this.
+
+2011-04-18  Stefano Lattarini  <address@hidden>
+
+       tests: don't allow `$me' to be overridden from the environment
+       * tests/defs.in: Sanity check: abort if $me is in the environment.
+       * tests/self-check-me-in-env.test: New test.
+       * tests/Makefile.am (TESTS_ENVIRONMENT): Unset variable `me'.
+       (TESTS): Update.
+       Suggestion by Ralf Wildenhues.
+
 2011-04-18  Stefano Lattarini  <address@hidden>
 
        check: rename AM_TESTS_SETUP -> AM_TESTS_ENVIRONMENT
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d5a980a..1c1c200 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -98,6 +98,10 @@ EXTRA_DIST += instspc-tests.sh
 XFAIL_TESTS += $(instspc_xfail_tests)
 
 
+# The testsuite variable `$me' should be overridable from the
+# test scripts, but not from the environment.
+AM_TESTS_ENVIRONMENT = test x"$$me" = x || unset me;
+
 TESTS = \
 aclocal.test \
 aclocal3.test \
@@ -817,6 +821,7 @@ self-check-dir.test \
 self-check-exit.test \
 self-check-is_newest.test \
 self-check-me.test \
+self-check-me-in-env.test \
 self-check-sanity.test \
 self-check-unindent.test \
 sanity.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 794a7b7..76e4588 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -362,6 +362,10 @@ instspc_xfail_tests = instspc-squote-build.test \
        instspc-dquote-install.test instspc-bquote-install.test \
        instspc-sharp-install.test instspc-dollar-install.test \
        instspc-linefeed-install.test instspc-a_lf_b-install.test
+
+# The testsuite variable `$me' should be overridable from the
+# test scripts, but not from the environment.
+AM_TESTS_ENVIRONMENT = test x"$$me" = x || unset me;
 TESTS = \
 aclocal.test \
 aclocal3.test \
@@ -1081,6 +1085,7 @@ self-check-dir.test \
 self-check-exit.test \
 self-check-is_newest.test \
 self-check-me.test \
+self-check-me-in-env.test \
 self-check-sanity.test \
 self-check-unindent.test \
 sanity.test \
diff --git a/tests/defs b/tests/defs
index ae05b82..6a8d06f 100644
--- a/tests/defs
+++ b/tests/defs
@@ -40,6 +40,9 @@ if test -z "$me"; then
   me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//'` \
     && test -n "$me" \
     || { echo "$argv0: failed to define \$me" >&2; exit 99; }
+elif env | grep '^me=' >/dev/null; then
+  echo "$0: variable \`me' is set in the environment: this is unsafe" >&2
+  exit 99
 fi
 
 ## ---------------------------------------- ##
diff --git a/tests/self-check-is_newest.test b/tests/self-check-me-in-env.test
similarity index 69%
copy from tests/self-check-is_newest.test
copy to tests/self-check-me-in-env.test
index f179229..966088d 100755
--- a/tests/self-check-is_newest.test
+++ b/tests/self-check-me-in-env.test
@@ -15,28 +15,16 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Sanity check for the automake testsuite.
-# Check the `is_newest' subroutine.
+# Make sure that the testsuite initialization code complains when
+# $me is set in the environment.
 
-. ./defs || Exit 1
+. ./defs-static || exit 1
 
-: > a
-$sleep
-: > b
-: > c
+set -x
 
-stat a b c || : # for debugging
-
-is_newest c a
-is_newest b a
-is_newest a b && Exit 1
-is_newest c b
-is_newest c c
-is_newest c a b c
-
-touch -r c d
-
-stat c d || : # for debugging
-
-is_newest c d
+exec 5>&1
+env me=foo $SHELL -c '. ./defs' foo.test && exit 1
+env me=foo $SHELL -c '. ./defs' foo.test 2>&1 1>&5 \
+  | grep "variable \`me' is set in the environment.*unsafe" || exit 1
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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