autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autotest function usage


From: Ralf Wildenhues
Subject: Re: Autotest function usage
Date: Sun, 21 Oct 2007 11:59:24 +0200
User-agent: Mutt/1.5.16 (2007-10-11)

> * Eric Blake wrote on Wed, Oct 17, 2007 at 09:07:02PM CEST:
> > According to Ralf Wildenhues on 10/17/2007 12:34 PM:
> > > 
> > > With these patches, and CONFIG_SHELL=/bin/zsh, the testsuite only fails
> > > `Configuring subdirectories', because `configure --silent' still outputs
> > > the warnings about broken shell function support.  I don't mind this
> > > failure (one could think about outputting on stderr).  Of course, that
> > > doesn't mean that all tests work correctly now.  ;-)
> > 
> > Hmm, that sounds like a separate patch for directing shell function
> > warnings to stderr, but sounds like the way to go.

Hmm.  That would pull in a rather hefty amount of followup changes.
Not sure whether to weaken the testsuite this way.  I went as far as
fixing the `Configuring subdirectories' test, only to notice that all
those 40-some tests using `AT_CHECK_AT' or `AT_CHECK_AT_TEST' need
weakening, and then some more.  I don't think weakening the testsuite
this way is worth pursuing.  OTOH if we don't, then testing with zsh
will be impossible, unless we also do not output the errors on stderr.

How about we leave things the way they are?

Cheers,
Ralf

2007-10-21  Ralf Wildenhues  <address@hidden>

        * lib/m4sugar/m4sh.m4 (_AS_SHELL_FN_WORK, _AS_SHELL_FN_SPY):
        Output errors on stderr.
        * tests/torture.at (Configuring subdirectories): Adjust for
        zsh errors.

diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 7036c00..4c80885 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -308,19 +308,19 @@ as_func_ret_failure () {
 exitcode=0
 AS_IF([as_func_success], [],
   [exitcode=1
-  echo as_func_success failed.])
+  echo as_func_success failed. >&2])
 AS_IF([as_func_failure],
   [exitcode=1
-  echo as_func_failure succeeded.])
+  echo as_func_failure succeeded. >&2])
 AS_IF([as_func_ret_success], [],
   [exitcode=1
-  echo as_func_ret_success failed.])
+  echo as_func_ret_success failed. >&2])
 AS_IF([as_func_ret_failure],
   [exitcode=1
-  echo as_func_ret_failure succeeded.])
+  echo as_func_ret_failure succeeded. >&2])
 AS_IF([( set x; as_func_ret_success y && test x = "[$]1" )], [],
   [exitcode=1
-  echo positional parameters were not saved.])
+  echo positional parameters were not saved. >&2])
 test $exitcode = 0[]dnl
 ])# _AS_SHELL_FN_WORK
 
@@ -1639,7 +1639,7 @@ _AS_RUN([_AS_SHELL_FN_WORK]) || {
   echo including any error possibly output before this message.
   echo This can help us improve future autoconf versions.
   echo Configuration will now proceed without shell functions.
-}
+} >&2
 ])
 
 
diff --git a/tests/torture.at b/tests/torture.at
index 0a835ba..803a543 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -1053,11 +1053,11 @@ AT_CHECK([test -f inner/configure])
 # Running the outer configure recursively should provide the innermost
 # help strings.
 chmod a-w inner/innermost inner .
-AT_CHECK([./configure --help=recursive | grep INNER], 0, [ignore])
+AT_CHECK([./configure --help=recursive | grep INNER], 0, [ignore], [ignore])
 chmod u+w . inner inner/innermost
 
 # Running the outer configure should trigger the inner.
-AT_CHECK_CONFIGURE
+AT_CHECK_CONFIGURE([], [], [], [ignore])
 AT_CHECK([cat inner/innermost/config], 0,
 [INNER=inner
 srcdir=.
@@ -1067,7 +1067,7 @@ prefix=/usr/local
 
 # The same, but from a builddir.
 AS_MKDIR_P([builddir])
-AT_CHECK([cd builddir && ../configure], 0, [ignore])
+AT_CHECK([cd builddir && ../configure], 0, [ignore], [ignore])
 AT_CHECK([cat builddir/inner/innermost/config], 0,
 [INNER=inner
 srcdir=../../../inner/innermost
@@ -1077,7 +1077,7 @@ prefix=/usr/local
 
 # Make sure precious variables and command line options are properly
 # passed, even when there are duplicates.
-AT_CHECK([cd builddir && ../configure --prefix /bad --prefix /good INNER=bad 
INNER=good], 0, [ignore])
+AT_CHECK([cd builddir && ../configure --prefix /bad --prefix /good INNER=bad 
INNER=good], 0, [ignore], [ignore])
 AT_CHECK([cat builddir/inner/innermost/config], 0,
 [INNER=good
 srcdir=../../../inner/innermost
@@ -1086,7 +1086,7 @@ prefix=/good
 ])
 
 # Make sure --prefix is properly quoted
-AT_CHECK([cd builddir && ../configure --prefix "/a  b c$ 'd"], 0, [ignore])
+AT_CHECK([cd builddir && ../configure --prefix "/a  b c$ 'd"], 0, [ignore], 
[ignore])
 AT_CHECK([cat builddir/inner/innermost/config], 0,
 [INNER=inner
 srcdir=../../../inner/innermost
@@ -1095,9 +1095,10 @@ prefix=/a  b c$ 'd
 ])
 
 # Make sure --silent is properly passed...
-AT_CHECK([cd builddir && ../configure --silent], 0, [])
+# (while ignoring warnings about broken zsh 4.2.x on stderr)
+AT_CHECK([cd builddir && ../configure --silent], 0, [], [ignore], [ignore])
 # ...but not stored in config.status.
-AT_CHECK([cd builddir && ./config.status --recheck], 0, [stdout])
+AT_CHECK([cd builddir && ./config.status --recheck], 0, [stdout], [ignore])
 AT_CHECK([grep 'creating \./config.status' stdout], 0, [ignore])
 
 # Make sure we can run autoreconf on a subdirectory




reply via email to

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