tests: avoid a spurious failure on MacOS X 10.6.8
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 27 Jun 2013 12:43:12 +0000 (14:43 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 27 Jun 2013 12:44:09 +0000 (14:44 +0200)
Fixes automake bug#14706.

* t/depcomp2.sh: Strip, from the redirected ./configure stderr, the
possible error message "rm: conftest.dSYM: is a directory", generated
by cleanup code that doesn't cater to the existence of *.dSYM
directories sometimes created by the compiler on MacOS X.  This
"massaging" of ./configure stderr is legitimate, since the spurious
error message is due not to automake-related code, but to a know
buglet/limitation of either Autoconf or Mac OS X bundles gcc:
<http://lists.gnu.org/archive/html/bug-autoconf/2007-11/msg00017.html>
Actually, from that link it appears that the original Autoconf issue
had been fixed, but it must have been re-introduced in the meantime :-(

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/depcomp2.sh

index 2182164..3eba12d 100644 (file)
@@ -45,6 +45,9 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 ./configure 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
-test ! -s stderr
+# Ignore warning messages sometimes seen on Mac OS X; they are
+# not automake's fault anyway, but either autoconf's or Mac's.
+sed '/rm:.* conftest\.dSYM/d' stderr >stderr2
+test -s stderr2 && { cat stderr2; exit 1; }
 
 :