[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-350-g
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-350-g5d1f3f0 |
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=5d1f3f0c14af19df45406386b514008916f7d80b
The branch, maint has been updated
via 5d1f3f0c14af19df45406386b514008916f7d80b (commit)
via 9b5a8552fec112499a527a8af8577a9b76144435 (commit)
from 3b64c7d208952e94c4b6a317cf34e5e650e77fe6 (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 5d1f3f0c14af19df45406386b514008916f7d80b
Merge: 3b64c7d 9b5a855
Author: Stefano Lattarini <address@hidden>
Date: Tue Apr 19 22:39:14 2011 +0200
Merge branch 'me-override-fix' into maint
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +++++++
tests/Makefile.am | 5 ++++
tests/Makefile.in | 5 ++++
tests/defs.in | 3 ++
...{help-python.test => self-check-me-in-env.test} | 25 ++++++-------------
5 files changed, 30 insertions(+), 17 deletions(-)
copy tests/{help-python.test => self-check-me-in-env.test} (67%)
diff --git a/ChangeLog b/ChangeLog
index bdb49db..b139a98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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-17 Stefano Lattarini <address@hidden>
test defs: allow overriding of `$me'
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b91a025..cc25167 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -38,7 +38,12 @@ $(parallel_tests): $(parallel_tests:-p.test=.test)
Makefile.am
MAINTAINERCLEANFILES = $(parallel_tests)
+# The testsuite variable `$me' should be overridable from the
+# test scripts, but not from the environment.
+TESTS_ENVIRONMENT = test x"$$me" = x || unset me;
+
TESTS = \
+self-check-me-in-env.test \
aclibobj.test \
aclocal.test \
aclocal3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 0cc6854..9ccbdbd 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -308,7 +308,12 @@ pr401b-p.test \
pr401c-p.test
MAINTAINERCLEANFILES = $(parallel_tests)
+
+# The testsuite variable `$me' should be overridable from the
+# test scripts, but not from the environment.
+TESTS_ENVIRONMENT = test x"$$me" = x || unset me;
TESTS = \
+self-check-me-in-env.test \
aclibobj.test \
aclocal.test \
aclocal3.test \
diff --git a/tests/defs.in b/tests/defs.in
index 38bb4e5..342e76d 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -69,6 +69,9 @@ test -f "$srcdir/defs.in" || {
# be done carefully, and *before* including ./defs).
if test -z "$me"; then
me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+elif env | grep '^me=' >/dev/null; then
+ echo "$0: variable \`me' is set in the environment: this is unsafe" >&2
+ exit 99
fi
# This might be used in testcases checking distribution-related features.
diff --git a/tests/help-python.test b/tests/self-check-me-in-env.test
similarity index 67%
copy from tests/help-python.test
copy to tests/self-check-me-in-env.test
index ba20013..344a861 100755
--- a/tests/help-python.test
+++ b/tests/self-check-me-in-env.test
@@ -14,24 +14,15 @@
# 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 that macro `AM_PATH_PYTHON' adds proper text to the
-# configure help screen.
+# Sanity check for the automake testsuite.
+# Make sure that the testsuite initialization code complains when
+# $me is set in the environment.
-. ./defs || Exit 1
+set -x
-set -e
-
-cat > configure.in <<END
-AC_INIT([$me], [1.0])
-AM_PATH_PYTHON
-END
-
-$ACLOCAL
-$AUTOCONF
-
-./configure --help >stdout || { cat stdout; Exit 1; }
-cat stdout
-
-grep '^ *PYTHON *the Python interpreter$' stdout
+exec 5>&1
+env me=foo /bin/sh -c '. ./defs' foo.test && exit 1
+env me=foo /bin/sh -c '. ./defs' foo.test 2>&1 1>&5 \
+ | grep "variable \`me' is set in the environment.*unsafe" || exit 1
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-350-g5d1f3f0,
Stefano Lattarini <=