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


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-788-g3b0c8d5
Date: Sat, 23 Apr 2011 08:15:55 +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=3b0c8d59b79346861dd48242672b7aed7f863c9f

The branch, master has been updated
       via  3b0c8d59b79346861dd48242672b7aed7f863c9f (commit)
       via  d53f5cd99c0946f77ff473e44db13514cc062837 (commit)
       via  5d1f3f0c14af19df45406386b514008916f7d80b (commit)
      from  942379cc3862ca20003ccea44edff90e6a13b314 (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 3b0c8d59b79346861dd48242672b7aed7f863c9f
Merge: 942379c d53f5cd
Author: Stefano Lattarini <address@hidden>
Date:   Sat Apr 23 00:02:23 2011 +0200

    Merge branch 'maint'

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

Summary of changes:
 ChangeLog                                          |   13 +++++++++++++
 tests/Makefile.am                                  |    9 ++++++---
 tests/Makefile.in                                  |   10 +++++++---
 tests/defs                                         |   11 +++++++++++
 ...me-in-env.test => self-check-env-sanitize.test} |   11 ++++++-----
 5 files changed, 43 insertions(+), 11 deletions(-)
 rename tests/{self-check-me-in-env.test => self-check-env-sanitize.test} (73%)

diff --git a/ChangeLog b/ChangeLog
index 6aeafd5..8821b0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-04-22  Stefano Lattarini  <address@hidden>
+
+       testsuite: more environment sanitization
+       * tests/defs.in: Sanity check: abort if any of `parallel_tests'
+       or `required' is in the environment.
+       ($sed_unindent_prog): Initialize to empty, to avoid interferences
+       from the environment.
+       * tests/self-check-me-in-env.test: Renamed to ...
+       * tests/self-check-env-sanitize.test: ... this, and extended.
+       * tests/Makefile.am (TESTS): Update.
+       (TESTS_ENVIRONMENT): Unset variables `parallel_tests' and
+       `required'.  Adjust comments.
+
 2011-04-19  Stefano Lattarini  <address@hidden>
 
        tests: in self-checks, use $SHELL, not /bin/sh
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1c1c200..f748ef5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -98,9 +98,12 @@ EXTRA_DIST += instspc-tests.sh
 XFAIL_TESTS += $(instspc_xfail_tests)
 
 
-# The testsuite variable `$me' should be overridable from the
+# Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
-AM_TESTS_ENVIRONMENT = test x"$$me" = x || unset me;
+AM_TESTS_ENVIRONMENT = \
+  test x"$$me" = x || unset me; \
+  test x"$$required" = x || unset required; \
+  test x"$$parallel_tests" = x || unset parallel_tests;
 
 TESTS = \
 aclocal.test \
@@ -818,10 +821,10 @@ repeated-options.test \
 rulepat.test \
 self-check-cleanup.test \
 self-check-dir.test \
+self-check-env-sanitize.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 76e4588..859eed6 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -363,9 +363,13 @@ instspc_xfail_tests = instspc-squote-build.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
+# Some testsuite-influential variables should be overridable from the
 # test scripts, but not from the environment.
-AM_TESTS_ENVIRONMENT = test x"$$me" = x || unset me;
+AM_TESTS_ENVIRONMENT = \
+  test x"$$me" = x || unset me; \
+  test x"$$required" = x || unset required; \
+  test x"$$parallel_tests" = x || unset parallel_tests;
+
 TESTS = \
 aclocal.test \
 aclocal3.test \
@@ -1082,10 +1086,10 @@ repeated-options.test \
 rulepat.test \
 self-check-cleanup.test \
 self-check-dir.test \
+self-check-env-sanitize.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 6a8d06f..797e542 100644
--- a/tests/defs
+++ b/tests/defs
@@ -73,6 +73,16 @@ test -f "$testbuilddir/defs-static" || {
    exit 99
 }
 
+# Check that the environment is properly sanitized.
+for var in required parallel_tests; do
+  if env | grep "^$var=" >/dev/null; then
+    echo "$me: variable \`$var' is set in the environment:" \
+         "this is unsafe" >&2
+    exit 99
+  fi
+done
+unset var
+
 # Unset some MAKE... variables that may cause $MAKE to act like a
 # recursively invoked sub-make.  Any $MAKE invocation in a test is
 # conceptually an independent invocation, not part of the main
@@ -208,6 +218,7 @@ unindent ()
   fi
   sed "$sed_unindent_prog" ${1+"$@"}
 }
+sed_unindent_prog="" # Avoid interferences from the environment.
 
 
 ## ----------------------------------------------------------- ##
diff --git a/tests/self-check-me-in-env.test 
b/tests/self-check-env-sanitize.test
similarity index 73%
rename from tests/self-check-me-in-env.test
rename to tests/self-check-env-sanitize.test
index 966088d..a8aaec0 100755
--- a/tests/self-check-me-in-env.test
+++ b/tests/self-check-env-sanitize.test
@@ -16,15 +16,16 @@
 
 # Sanity check for the automake testsuite.
 # Make sure that the testsuite initialization code complains when
-# $me is set in the environment.
+# some testsuite-influential variables are set in the environment.
 
 . ./defs-static || exit 1
 
 set -x
 
-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
+for var in me parallel_tests required; do
+  env "$var=foo" $SHELL -c '. ./defs' foo.test && exit 1
+  env "$var=foo" $SHELL -c '. ./defs' foo.test 2>&1 1>&5 \
+    | grep "variable \`$var' is set in the environment.*unsafe" || exit 1
+done
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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