autoconf-patches
[Top][All Lists]
Advanced

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

tests: avoid AC_CACHE_CHECK test failure with dash.


From: Ralf Wildenhues
Subject: tests: avoid AC_CACHE_CHECK test failure with dash.
Date: Tue, 12 Oct 2010 07:31:29 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

dash immediately exits a script with status 2 when a source'd '.'
file has a syntax error, and doesn't return to the sourcing script.
That's fine as per Posix, I guess, so normalize the exit status in
the test, and if we don't find the error message, at least ensure the
script didn't configure.

OK?

Thanks,
Ralf

    tests: avoid AC_CACHE_CHECK test failure with dash.
    
    * tests/base.at (AC_CACHE_CHECK): Normalize configure exit
    status in presence of syntax error in sourced site file.
    Do not error out if configure is aborted at this point.
    Fixes testsuite failure with dash 0.5.5.1.

diff --git a/tests/base.at b/tests/base.at
index cf12099..0973fc4 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -493,8 +493,9 @@ AT_DATA([bad.site],
 [[fi
 ]])
 CONFIG_SITE=$PWD/bad.site
-AT_CHECK_CONFIGURE([], [1], [ignore], [stderr])
-AT_CHECK([grep 'failed to load site script' stderr], [], [ignore])
+AT_CHECK_CONFIGURE([ || exit 1], [1], [stdout], [stderr])
+AT_CHECK([grep 'failed to load site script' stderr], [], [ignore], [ignore],
+        [AT_CHECK([grep 'whether true' stdout], [1])])
 
 # However, a missing file is ignored.
 CONFIG_SITE=./no-such-file



reply via email to

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