autoconf-patches
[Top][All Lists]
Advanced

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

Re: CONFIG_SITE check failure due to shell trap exit status handling


From: Ralf Wildenhues
Subject: Re: CONFIG_SITE check failure due to shell trap exit status handling
Date: Tue, 24 Aug 2010 23:01:30 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Rainer Tammer wrote on Tue, Aug 24, 2010 at 05:02:55PM CEST:
> On 14.08.2010 09:34, Ralf Wildenhues wrote:
> > * Ralf Wildenhues wrote on Sat, Aug 07, 2010 at 09:55:13AM CEST:
> >> The least radical step would be to just modify the test group to accept
> >> any kind of exit status and if wrongly zero, look for at least an error
> >> message from the shell.  Eric, WDYT?
> > Or, just skip that part of the test, similar to autotest.at:Syntax
> > error.  Sorry, I failed to see earlier that we have dealt with this
> > kind of issue before elsewhere.
> >
> Yes,
> skipping sound good to me in this case.

Tested FreeBSD and AIX sh as well as zsh, all skip instead of fail now.
Copied the code from autotest.at.  OK?

Thanks,
Ralf

    tests: fix AC_CACHE_CHECK to skip with bad shells.
    
    * tests/base.at (AC_CACHE_CHECK): Skip test with malformed
    config.site file if the shell does not report syntax errors
    from a sourced file.  Fixes test failure on AIX and FreeBSD.
    Report from Rainer Tammer.

diff --git a/tests/base.at b/tests/base.at
index 03c61b7..cf12099 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -482,6 +482,12 @@ AT_CHECK([grep my_cv_shell_true_works sitecache], [], 
[ignore])
 AT_CHECK_CONFIGURE([], [], [stdout])
 AT_CHECK([grep 'whether true.*works.*cached' stdout], [], [ignore])
 
+dnl Until we can find a way to avoid catastrophic failure,
+dnl skip the rest of this test on such shells.
+echo 'if' > syntax
+AT_CHECK([${CONFIG_SHELL-$SHELL} -c 'case `. ./syntax; echo $?` in
+            0|"") exit 77;; esac'], [0], [ignore], [ignore])
+
 # Check that config cache scripts must be well-formed.
 AT_DATA([bad.site],
 [[fi



reply via email to

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