automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Minor improvements and extensions to various tests.


From: Stefano Lattarini
Subject: Re: [PATCH] Minor improvements and extensions to various tests.
Date: Fri, 20 Aug 2010 16:57:59 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Rebased against latest maint, and dropped a couple of changes
which could have exposed too much of automake internals.

Regards,
  Stefano
From 1dfcb1a58c80d12615f1f677637114e34160d5a4 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Mon, 28 Jun 2010 13:44:33 +0200
Subject: [PATCH] Minor improvements and extensions to various tests.

* tests/defun.test: Also run autoconf and grep the generated
configure to make sure that aclocal truly picks up all the
required macros.
* tests/compile_f_c_cxx.test: Prefer trailing `:' over trailing
`Exit 0'.  Do not create useless dummy source files.  Do not set
useless `$(foo_LDADD)' variable in `Makefile.am'.  Do not call
useless macro `AC_F77_LIBRARY_LDFLAGS' in `configure.in'.
* tests/compile_f90_c_cxx.test: Likewise.
* tests/suffix10.test: Slighty stricter grepping of make output.
* tests/compile.test: Add trailing `:' command.
* tests/defun2.test: Likewise.
* tests/vars3.test: Likewise.
* tests/vartar.test: Likewise.
* tests/vars.test: Likewise.  Also, extend test by checking
that the definition of `MY_FLAGS*' variables is preserved in
the generated `Makefile.in'.
* tests/stamph2.test: Prefer trailing `:' over trailing `Exit 0'.
Use proper m4 quoting in `configure.in'.
---
 ChangeLog                    |   22 ++++++++++++++++++++++
 tests/compile.test           |    4 +++-
 tests/compile_f90_c_cxx.test |    8 +-------
 tests/compile_f_c_cxx.test   |    7 +------
 tests/defun.test             |   11 ++++++++++-
 tests/defun2.test            |    2 ++
 tests/stamph2.test           |   18 +++++++++---------
 tests/suffix10.test          |    5 +++--
 tests/vars.test              |    6 ++++++
 tests/vars3.test             |    2 ++
 tests/vartar.test            |    4 +++-
 11 files changed, 62 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 934eba6..6462c19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2010-08-20  Stefano Lattarini  <address@hidden>
+
+       Minor improvements and extensions to various tests.
+       * tests/defun.test: Also run autoconf and grep the generated
+       configure to make sure that aclocal truly picks up all the
+       required macros.
+       * tests/compile_f_c_cxx.test: Prefer trailing `:' over trailing
+       `Exit 0'.  Do not create useless dummy source files.  Do not set
+       useless `$(foo_LDADD)' variable in `Makefile.am'.  Do not call
+       useless macro `AC_F77_LIBRARY_LDFLAGS' in `configure.in'.
+       * tests/compile_f90_c_cxx.test: Likewise.
+       * tests/suffix10.test: Slighty stricter grepping of make output.
+       * tests/compile.test: Add trailing `:' command.
+       * tests/defun2.test: Likewise.
+       * tests/vars3.test: Likewise.
+       * tests/vartar.test: Likewise.
+       * tests/vars.test: Likewise.  Also, extend test by checking
+       that the definition of `MY_FLAGS*' variables is preserved in
+       the generated `Makefile.in'.
+       * tests/stamph2.test: Prefer trailing `:' over trailing `Exit 0'.
+       Use proper m4 quoting in `configure.in'.
+
 2010-08-18  Stefano Lattarini  <address@hidden>
 
        Fix potential regressions in depcomp{3,5}.test.
diff --git a/tests/compile.test b/tests/compile.test
index ef27afe..4b0e045 100755
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010 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
@@ -42,3 +42,5 @@ test -f a.c
 ./compile touch a.obj -- -o ac.obj a.c
 test ! -f a.obj
 test ac.obj
+
+:
diff --git a/tests/compile_f90_c_cxx.test b/tests/compile_f90_c_cxx.test
index 21ed65d..bb46390 100755
--- a/tests/compile_f90_c_cxx.test
+++ b/tests/compile_f90_c_cxx.test
@@ -27,19 +27,13 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_FC
-AC_FC_LIBRARY_LDFLAGS
 END
 
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
 foo_SOURCES  = foo.f90 bar.c baz.cc
-foo_LDADD    = @FLIBS@
 END
 
-: > foo.f90
-: > bar.c
-: > baz.cc
-
 $ACLOCAL
 $AUTOMAKE
 
@@ -49,4 +43,4 @@ $FGREP '      $(COMPILE)'    Makefile.in
 $FGREP '       $(CXXCOMPILE)' Makefile.in
 $FGREP '       $(FCCOMPILE)'  Makefile.in
 
-Exit 0
+:
diff --git a/tests/compile_f_c_cxx.test b/tests/compile_f_c_cxx.test
index a995527..2ab5349 100755
--- a/tests/compile_f_c_cxx.test
+++ b/tests/compile_f_c_cxx.test
@@ -33,13 +33,8 @@ END
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
 foo_SOURCES  = foo.f bar.c baz.cc
-foo_LDADD    = @FLIBS@
 END
 
-: > foo.f
-: > bar.c
-: > baz.cc
-
 $ACLOCAL
 $AUTOMAKE
 
@@ -49,4 +44,4 @@ $FGREP '      $(COMPILE)'    Makefile.in
 $FGREP '       $(CXXCOMPILE)' Makefile.in
 $FGREP '       $(F77COMPILE)' Makefile.in
 
-Exit 0
+:
diff --git a/tests/defun.test b/tests/defun.test
index 5ffb9a1..6041918 100755
--- a/tests/defun.test
+++ b/tests/defun.test
@@ -21,8 +21,17 @@
 set -e
 
 cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_FUNC_TWO])
+AC_DEFUN([AM_FUNC_THREE])
+AC_DEFUN([AM_FUNC_TWO], address@hidden@AM_FUNC_THREE])
 AC_DEFUN([AM_FUNC_ONE], [AC_REQUIRE([AM_FUNC_TWO])])
 END
 
+cat >>configure.in << 'END'
+AM_FUNC_ONE
+END
+
 $ACLOCAL
+$AUTOCONF
+grep 'address@hidden@$' configure
+
+:
diff --git a/tests/defun2.test b/tests/defun2.test
index 6c10a8f..1e2677d 100755
--- a/tests/defun2.test
+++ b/tests/defun2.test
@@ -38,3 +38,5 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/stamph2.test b/tests/stamph2.test
index cb96d27..aa07743 100755
--- a/tests/stamph2.test
+++ b/tests/stamph2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 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,14 +20,14 @@
 set -e
 
 cat >> configure.in << END
-AM_CONFIG_HEADER(1.h
-                 2.h:config.hin
-                 3.h:sdir1/config1.hin)
+AM_CONFIG_HEADER([1.h
+                  2.h:config.hin
+                  3.h:sdir1/config1.hin])
 # AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
-AC_CONFIG_HEADERS(sdir1/4.h
-                  sdir1/5.h:config.hin
-                  sdir1/6.h:sdir1/config1.hin
-                  sdir1/7.h:sdir2/config2.hin)
+AC_CONFIG_HEADERS([sdir1/4.h
+                   sdir1/5.h:config.hin
+                   sdir1/6.h:sdir1/config1.hin
+                   sdir1/7.h:sdir2/config2.hin])
 AC_OUTPUT
 END
 
@@ -68,4 +68,4 @@ test ! -f sdir1/stamp-h5
 test ! -f sdir1/stamp-h6
 test -f sdir1/stamp-h7
 
-Exit 0
+:
diff --git a/tests/suffix10.test b/tests/suffix10.test
index 131359c..d85ad8f 100755
--- a/tests/suffix10.test
+++ b/tests/suffix10.test
@@ -37,8 +37,9 @@ libfoo_la_SOURCES = foo.x_
 .x_.y:
        cp $< $@
 
+.PHONY: print
 print:
-       echo BEGIN: $(libfoo_la_OBJECTS) :END
+       @echo BEGIN: $(libfoo_la_OBJECTS) :END
 END
 
 libtoolize --force
@@ -50,6 +51,6 @@ $AUTOMAKE --add-missing
 
 $MAKE print >stdout || { cat stdout; Exit 1; }
 cat stdout
-grep 'BEGIN: foo.lo :END' stdout
+$FGREP 'BEGIN: foo.lo :END' stdout
 
 :
diff --git a/tests/vars.test b/tests/vars.test
index 6163a8d..c88db68 100755
--- a/tests/vars.test
+++ b/tests/vars.test
@@ -30,3 +30,9 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+for i in 1 2 3 4; do
+  grep "^MY_FLAGS_$i *= *-DABC=345 *$" Makefile.in
+done
+
+:
diff --git a/tests/vars3.test b/tests/vars3.test
index 6b738ab..e8609ee 100755
--- a/tests/vars3.test
+++ b/tests/vars3.test
@@ -82,3 +82,5 @@ $AUTOMAKE -Wno-portability
 # processed far later).
 echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
 $AUTOMAKE
+
+:
diff --git a/tests/vartar.test b/tests/vartar.test
index 3a18d77..a33ab64 100755
--- a/tests/vartar.test
+++ b/tests/vartar.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 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
@@ -37,3 +37,5 @@ install:
 EOF
 sed -n '/^install:/,/^ /p' Makefile.in > target.value
 diff target.expected target.value
+
+:
-- 
1.7.1


reply via email to

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