automake-patches
[Top][All Lists]
Advanced

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

[FYI] {msvc} tests: various minor tweakings, mostly related to AM_PROG_A


From: Stefano Lattarini
Subject: [FYI] {msvc} tests: various minor tweakings, mostly related to AM_PROG_AR
Date: Thu, 3 Nov 2011 15:15:29 +0100

* tests/alloca.test: Adjust to new portability requirements due
to the new AM_PROG_AR macro.
* tests/discover.test: Likewise.
* tests/libobj3.test: Likewise.
* tests/pluseq7.test: Likewise.  Also, make grepping of automake
expected error message stricter.
* tests/stdlib.test: Likewise, and extend the test a bit.
* tests/parse.test (configure.in): Remove redundant call to
AC_PROG_RANLIB.
* tests/library2.test: Adjust to new portability requirements
due to the new AM_PROG_AR macro.  Also ...
(configure.in): ... add call to AC_PROG_CC, to ensure automake
really fails for the expected reason.
---
 ChangeLog           |   17 +++++++++++++++++
 tests/alloca.test   |    4 +++-
 tests/discover.test |    4 +++-
 tests/libobj3.test  |    6 +++++-
 tests/library2.test |    8 ++++++--
 tests/parse.test    |    4 ++--
 tests/pluseq7.test  |    9 +++++----
 tests/stdlib.test   |   25 ++++++++++++++++++++++---
 8 files changed, 63 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bd0a165..0688736 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2011-11-03  Stefano Lattarini  <address@hidden>
+
+       tests: various minor tweakings, mostly related to AM_PROG_AR
+       * tests/alloca.test: Adjust to new portability requirements due
+       to the new AM_PROG_AR macro.
+       * tests/discover.test: Likewise.
+       * tests/libobj3.test: Likewise.
+       * tests/pluseq7.test: Likewise.  Also, make grepping of automake
+       expected error message stricter.
+       * tests/stdlib.test: Likewise, and extend the test a bit.
+       * tests/parse.test (configure.in): Remove redundant call to
+       AC_PROG_RANLIB.
+       * tests/library2.test: Adjust to new portability requirements
+       due to the new AM_PROG_AR macro.  Also ...
+       (configure.in): ... add call to AC_PROG_CC, to ensure automake
+       really fails for the expected reason.
+
 2011-11-03  Zack Weinberg <address@hidden>  (tiny change)
            Stefano Lattarini  <address@hidden>
 
diff --git a/tests/alloca.test b/tests/alloca.test
index 8a1e06e..6304002 100755
--- a/tests/alloca.test
+++ b/tests/alloca.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
 set -e
 
 cat >> configure.in <<'END'
+AM_PROG_AR
 AC_PROG_CC
 END
 
@@ -31,6 +32,7 @@ libtu_a_LIBADD = @ALLOCA@
 END
 
 : > alloca.c
+: > ar-lib
 
 $ACLOCAL
 AUTOMAKE_fails
diff --git a/tests/discover.test b/tests/discover.test
index 0e4faa3..41b11f5 100755
--- a/tests/discover.test
+++ b/tests/discover.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010, 2011 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -21,6 +21,7 @@
 
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
+AM_PROG_AR
 AC_PROG_CC
 AC_LIBOBJ([fsusage])
 AC_OUTPUT
@@ -33,6 +34,7 @@ libtu_a_LIBADD = @LIBOBJS@
 END
 
 : > fsusage.c
+: > ar-lib
 
 $ACLOCAL
 AUTOMAKE_fails
diff --git a/tests/libobj3.test b/tests/libobj3.test
index 0aeced9..7304b09 100755
--- a/tests/libobj3.test
+++ b/tests/libobj3.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2011 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,6 +23,7 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_RANLIB
+AM_PROG_AR
 END
 
 cat > Makefile.am << 'END'
@@ -30,6 +32,8 @@ libtu_a_SOURCES =
 libtu_a_LIBADD = @LIBOBJS@
 END
 
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
 grep 'Makefile.am:3:.*LIBOBJS' stderr
diff --git a/tests/library2.test b/tests/library2.test
index 0dbff28..d30c504 100755
--- a/tests/library2.test
+++ b/tests/library2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,10 +20,14 @@
 
 set -e
 
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
 cat > Makefile.am << 'END'
 EXTRA_LIBRARIES = libfoo.a
 END
 
 $ACLOCAL
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-portability
 grep AC_PROG_RANLIB stderr
diff --git a/tests/parse.test b/tests/parse.test
index e7dcbe5..bf5b63a 100755
--- a/tests/parse.test
+++ b/tests/parse.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2011 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,7 +23,6 @@ cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
 AC_PROG_CC
-AC_PROG_RANLIB
 AC_OUTPUT(Makefile)
 END
 
diff --git a/tests/pluseq7.test b/tests/pluseq7.test
index 0716462..31a4246 100755
--- a/tests/pluseq7.test
+++ b/tests/pluseq7.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2010, 2011 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -34,7 +34,8 @@ AR += qq
 END
 
 $ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:3:.*AR' stderr
+AUTOMAKE_fails -Wno-portability
+q="[\`'\"]"
+grep "^Makefile\.am:3:.* AR .* with $q=$q before .*$q+=$q" stderr
 
 :
diff --git a/tests/stdlib.test b/tests/stdlib.test
index 48f56fc..5ca9a7f 100755
--- a/tests/stdlib.test
+++ b/tests/stdlib.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2011 Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -22,15 +23,33 @@ set -e
 
 cat >> configure.in << 'END'
 AC_PROG_CC
+AM_PROG_AR
 AC_PROG_RANLIB
 END
 
 cat > Makefile.am << 'END'
 noinst_LIBRARIES = sub/foo
+include $(srcdir)/foo.mk
 END
 
+cat > foo.mk << 'END'
+## A dummy automake comment.
+a = x \
+    y
+# A dummy make comment.
+lib_LIBRARIES = zardoz.a
+END
+
+: > ar-lib
+
 $ACLOCAL
 AUTOMAKE_fails
+q="[\`'\"]"
+badname='not a standard library name'
 # We're specifically testing for line-number information.
-grep 'Makefile.am:1:.*sub/foo.*standard library name' stderr
-grep 'Makefile.am:1:.*sub/libfoo.a.*' stderr
+grep "^Makefile\\.am:1:.*${q}sub/foo${q}.*$badname" stderr
+grep "^Makefile\\.am:1:.*sub/libfoo\\.a" stderr
+grep "^foo\\.mk:5:.*${q}zardoz\\.a${q}.*$badname" stderr
+grep "^foo\\.mk:5:.*libzardoz\\.a" stderr
+
+:
-- 
1.7.2.3




reply via email to

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