tests: fix bug in alloca*.test
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 5 Mar 2011 00:57:36 +0000 (01:57 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 5 Mar 2011 00:57:36 +0000 (01:57 +0100)
* tests/alloca.test: Make grepping of automake stderr stricter,
add a trailing `:' command; also, add AC_PROG_CC to configure.in,
and create a dummy alloca.c file, to ensure that we fail for the
proper reason.
* tests/alloca2.test: Likewise.  Also, look for LT_INIT, not
AC_PROG_LIBTOOL, in the error message (bug introduced with commit
v1.11-315-gd51e7b7 "libtool: suggest LT_INIT if LTLIBRARIES
primary is used").

From a report by Patrick Welche.

ChangeLog
tests/alloca.test
tests/alloca2.test

index 991ed0b..804fae6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2011-03-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       tests: fix bug in alloca*.test
+       * tests/alloca.test: Make grepping of automake stderr stricter,
+       add a trailing `:' command; also, add AC_PROG_CC to configure.in,
+       and create a dummy alloca.c file, to ensure that we fail for the
+       proper reason.
+       * tests/alloca2.test: Likewise.  Also, look for LT_INIT, not
+       AC_PROG_LIBTOOL, in the error message (bug introduced with commit
+       v1.11-315-gd51e7b7 "libtool: suggest LT_INIT if LTLIBRARIES
+       primary is used").
+       From a report by Patrick Welche.
+
+2011-03-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        tests: fix bug (comments-in-var-defn.test + autoconf 2.62)
        * tests/comments-in-var-defn.test: The configure.in stub created
        by default, which has the AC_INIT first argument obtained by the
index 6cf51bb..8a1e06e 100755 (executable)
 
 set -e
 
+cat >> configure.in <<'END'
+AC_PROG_CC
+END
+
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = libtu.a
 libtu_a_SOURCES =
 libtu_a_LIBADD = @ALLOCA@
 END
 
+: > alloca.c
+
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:1:.*AC_PROG_RANLIB' stderr
-grep 'Makefile.am:3:.*AC_FUNC_ALLOCA' stderr
+grep '^Makefile\.am:1:.*define .*RANLIB.* add .*AC_PROG_RANLIB' stderr
+grep '^Makefile\.am:3:.*define .*ALLOCA.* add .*AC_FUNC_ALLOCA' stderr
+
+:
index 4ecd229..caf11a3 100755 (executable)
 
 set -e
 
+cat >> configure.in <<'END'
+AC_PROG_CC
+END
+
 cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = libtu.la
 libtu_la_SOURCES =
 libtu_la_LIBADD = @LTALLOCA@
 END
 
+: > alloca.c
+
 $ACLOCAL
 AUTOMAKE_fails
-grep 'Makefile.am:1:.*AC_PROG_LIBTOOL' stderr
-grep 'Makefile.am:3:.*ALLOCA' stderr
+grep '^Makefile\.am:1:.*define.*LIBTOOL.* add .*LT_INIT' stderr
+grep '^Makefile\.am:3:.*LTALLOCA' stderr
+
+: