[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Minor improvements and extensions to various tests.
From: |
Stefano Lattarini |
Subject: |
[PATCH] Minor improvements and extensions to various tests. |
Date: |
Mon, 28 Jun 2010 13:55:57 +0200 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) |
* 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'. Make
grepping of `Makefile.in' slighty stricter.
* tests/compile_f90_c_cxx.test: Likewise.
* tests/suffix10.test: Output from make and its grepping made
stricter.
* 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 | 24 ++++++++++++++++++++++++
tests/compile.test | 4 +++-
tests/compile_f90_c_cxx.test | 14 ++++----------
tests/compile_f_c_cxx.test | 13 ++++---------
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, 70 insertions(+), 33 deletions(-)
From bb28b4563e73e857d8a199eb31fa4c1c89013fc4 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'. Make
grepping of `Makefile.in' slighty stricter.
* tests/compile_f90_c_cxx.test: Likewise.
* tests/suffix10.test: Output from make and its grepping made
stricter.
* 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 | 24 ++++++++++++++++++++++++
tests/compile.test | 4 +++-
tests/compile_f90_c_cxx.test | 14 ++++----------
tests/compile_f_c_cxx.test | 13 ++++---------
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, 70 insertions(+), 33 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4366381..65f8dc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2010-06-28 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'. Make
+ grepping of `Makefile.in' slighty stricter.
+ * tests/compile_f90_c_cxx.test: Likewise.
+ * tests/suffix10.test: Output from make and its grepping made
+ stricter.
+ * 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-06-26 Ralf Wildenhues <address@hidden>
Update program --help output to match current GCS.
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..21f85e3 100755
--- a/tests/compile_f90_c_cxx.test
+++ b/tests/compile_f90_c_cxx.test
@@ -27,26 +27,20 @@ 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
# Look for the macros at the beginning of rules. Be careful, as there
# are literal tabs at the beginning of the search strings.
-$FGREP ' $(COMPILE)' Makefile.in
-$FGREP ' $(CXXCOMPILE)' Makefile.in
-$FGREP ' $(FCCOMPILE)' Makefile.in
+$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..9cca053 100755
--- a/tests/compile_f_c_cxx.test
+++ b/tests/compile_f_c_cxx.test
@@ -33,20 +33,15 @@ 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
# Look for the macros at the beginning of rules. Be careful, as there
# are literal tabs at the beginning of the search strings.
-$FGREP ' $(COMPILE)' Makefile.in
-$FGREP ' $(CXXCOMPILE)' Makefile.in
-$FGREP ' $(F77COMPILE)' Makefile.in
+$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 f7467f5..842d567 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.6.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Minor improvements and extensions to various tests.,
Stefano Lattarini <=