Improve tests link*.test (enable `set -e').
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 8 May 2010 00:25:50 +0000 (02:25 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 6 Jun 2010 12:27:57 +0000 (14:27 +0200)
* tests/link_c_cxx.test: Enable `errexit shell flag, and related
changes.  Also, do not create useless source files.
* tests/link_dist.test: Likewise.
* tests/link_f90_only.test: Likewise.
* tests/link_f_only.test: Likewise.
* tests/link_fc.test: Likewise.
* tests/link_fccxx.test: Likewise.
* tests/link_fcxx.test: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/link_c_cxx.test
tests/link_dist.test
tests/link_f90_only.test
tests/link_f_only.test
tests/link_fc.test
tests/link_fccxx.test
tests/link_fcxx.test

index a2db01b..a42f6f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-06-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Improve tests link*.test (enable `errexit' shell flag).
+       * tests/link_c_cxx.test: Enable `errexit shell flag, and related
+       changes.  Also, do not create useless source files.
+       * tests/link_dist.test: Likewise.
+       * tests/link_f90_only.test: Likewise.
+       * tests/link_f_only.test: Likewise.
+       * tests/link_fc.test: Likewise.
+       * tests/link_fccxx.test: Likewise.
+       * tests/link_fcxx.test: Likewise.
+
 2010-06-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Improve ext.test semantics, avoid OpenBSD sh errexit issue.
index 37b27d7..d1a093c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 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
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
@@ -29,18 +31,14 @@ bin_PROGRAMS = lavalamp
 lavalamp_SOURCES = lava.c lamp.cxx
 END
 
-: > lava.c
-: > lamp.cxx
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
+$ACLOCAL
+$AUTOMAKE
 
 # We should only see the C++ linker in the rules of `Makefile.in'.
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
-grep '.\$(CXXLINK)' Makefile.in  || Exit 1
+grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
 grep '.\$(FLINK)' Makefile.in && Exit 1
index 7e73cc3..661d683 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 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,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
@@ -31,18 +33,14 @@ lavalamp_SOURCES = lava.c
 dist_lavalamp_SOURCES = lamp.cxx
 END
 
-: > lava.c
-: > lamp.cxx
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
+$ACLOCAL
+$AUTOMAKE
 
 # We should only see the C++ linker in the rules of `Makefile.in'.
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
-grep '.\$(CXXLINK)' Makefile.in  || Exit 1
+grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
 grep '.\$(FLINK)' Makefile.in && Exit 1
index eeec3a6..979eb67 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 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
@@ -19,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_FC
 END
@@ -28,17 +31,14 @@ bin_PROGRAMS = lavalamp
 lavalamp_SOURCES = lamp.f90
 END
 
-: > lamp.f90
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
+$ACLOCAL
+$AUTOMAKE
 
 # We should only see the Fortran linker in the rules of `Makefile.in'.
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
-grep '.\$(FCLINK)' Makefile.in  || Exit 1
+grep '.\$(FCLINK)' Makefile.in
 
 # We should not see these patterns:
 grep '.\$(CXXLINK)' Makefile.in && Exit 1
index 4390bd6..c4df8ce 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 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
@@ -19,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_F77
 END
@@ -28,17 +31,14 @@ bin_PROGRAMS = lavalamp
 lavalamp_SOURCES = lamp.f
 END
 
-: > lamp.f
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
+$ACLOCAL
+$AUTOMAKE
 
 # We should only see the Fortran linker in the rules of `Makefile.in'.
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
-grep '.\$(F77LINK)' Makefile.in  || Exit 1
+grep '.\$(F77LINK)' Makefile.in
 
 # We should not see these patterns:
 grep '.\$(CXXLINK)' Makefile.in && Exit 1
index 5b23bd5..8c80f8c 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 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
@@ -19,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_F77
@@ -29,19 +32,15 @@ bin_PROGRAMS = lavalamp
 lavalamp_SOURCES = lava.c lamp.f
 END
 
-: > lava.c
-: > lamp.f
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
+$ACLOCAL
+$AUTOMAKE
 
 # We should only see the Fortran 77 linker in the rules of
 # `Makefile.in'.
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
-grep '.\$(F77LINK)' Makefile.in  || Exit 1
+grep '.\$(F77LINK)' Makefile.in
 
 # We should not see these patterns:
 grep '.\$(LINK)'    Makefile.in && Exit 1
index bd2b21d..30263d0 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 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
@@ -19,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
@@ -30,19 +33,14 @@ bin_PROGRAMS = lavalamp
 lavalamp_SOURCES = lava.c lamp.cxx lamp2.f
 END
 
-: > lava.c
-: > lamp.cxx
-: > lamp2.f
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
+$ACLOCAL
+$AUTOMAKE
 
 # We should only see the C++ linker in the rules of `Makefile.in'.
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
-grep '.\$(CXXLINK)' Makefile.in  || Exit 1
+grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
 grep '.\$(F77LINK)' Makefile.in && Exit 1
index e86f7cd..c75ffc7 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2001, 2002, 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
@@ -19,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CXX
 AC_PROG_F77
@@ -29,18 +32,14 @@ bin_PROGRAMS = lavalamp
 lavalamp_SOURCES = lava.cxx lamp.f
 END
 
-: > lava.cxx
-: > lamp.f
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
+$ACLOCAL
+$AUTOMAKE
 
 # We should only see the C++ linker in the rules of `Makefile.in'.
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
-grep '.\$(CXXLINK)' Makefile.in  || Exit 1
+grep '.\$(CXXLINK)' Makefile.in
 
 # We should not see these patterns:
 grep '.\$(F77LINK)' Makefile.in && Exit 1