Reference:
 <http://lists.gnu.org/archive/html/automake-patches/2011-02/msg00006.html>

On Sunday 06 February 2011, Stefano Lattarini wrote:
> On Friday 04 February 2011, Ralf Wildenhues wrote:
> > * Stefano Lattarini wrote on Mon, Jan 24, 2011 at 04:04:30PM CET:
> > > --- /dev/null
> > > +++ b/tests/check-tests_environment.test
> > 
> > > +# "Simple Tests" testsuite driver: check TESTS_ENVIRONMENT support.
> > > +
> > > +. ./defs || Exit 1
> > > +
> > > +set -e
> > > +
> > > +cat >> configure.in << 'END'
> > > +AC_OUTPUT
> > > +END
> > > +
> > > +cat > Makefile.am << 'END'
> > > +TESTS = foo.test
> > > +EXTRA_DIST = $(TESTS)
> > > +END
> > > +
> > > +cat > foo.test << 'END'
> > > +#! /bin/sh
> > > +test x"$FOO" = x"ok"
> > > +END
> > > +chmod a+x foo.test
> > > +
> > > +$ACLOCAL
> > > +$AUTOCONF
> > > +$AUTOMAKE -a
> > > +
> > > +./configure
> > > +
> > > +FOO=bad TESTS_ENVIRONMENT='FOO=ok'  $MAKE check
> > > +FOO=ok  TESTS_ENVIRONMENT='FOO=bad' $MAKE check && Exit 1
> > 
> > I wonder whether we need to unset TESTS_ENVIRONMENT in tests/defs.
> >
> That seems a good idea.  Will do in a follow-up patch.
> 
Done in the attached patch.  Will push in 72 hours if there's no
objection.

Regards,
   Stefano
From 5cc6a5a3835fe98b23e4dae86ba7228f977e50a2 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Thu, 10 Feb 2011 10:46:21 +0100
Subject: [PATCH] tests defs: clear TESTS_ENVIRONMENT variable

* tests/defs.in (TESTS_ENVIRONMENT): Unset it, so that values
from environment won't interfere with the testcases.

Suggestion by Ralf Wildenhues.
---
 ChangeLog     |    7 +++++++
 tests/defs.in |    3 ++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3750915..786cadd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-10  Stefano Lattarini  <stefano.lattar...@gmail.com>
+
+	tests defs: clear TESTS_ENVIRONMENT variable
+	* tests/defs.in (TESTS_ENVIRONMENT): Unset it, so that values
+	from environment won't interfere with the testcases.
+	Suggestion by Ralf Wildenhues.
+
 2011-02-06  Stefano Lattarini  <stefano.lattar...@gmail.com>
 
 	tests: tweak few tests on simple and parallel test drivers
diff --git a/tests/defs.in b/tests/defs.in
index 21fcc34..eb92caa 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -2,7 +2,7 @@
 # @configure_input@
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -329,6 +329,7 @@ unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
 # conceptually independent, they cause some changed semantics we
 # need to control (and test for) in some of the tests to ensure
 # backward-compatible behavior.
+unset TESTS_ENVIRONMENT
 unset DISABLE_HARD_ERRORS
 unset TESTS
 unset TEST_LOG_COMPILER
-- 
1.7.2.3

Reply via email to