From: Stefano Lattarini Date: Sat, 8 May 2010 00:25:50 +0000 (+0200) Subject: Improve tests link*.test (enable `set -e'). X-Git-Tag: v1.11.1b~80^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac61ca33187ca451bb01d733b472a027003e72b7;p=thirdparty%2Fautomake.git Improve tests link*.test (enable `set -e'). * 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 --- diff --git a/ChangeLog b/ChangeLog index a2db01b74..a42f6f5be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2010-06-06 Stefano Lattarini + + 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 Improve ext.test semantics, avoid OpenBSD sh errexit issue. diff --git a/tests/link_c_cxx.test b/tests/link_c_cxx.test index 37b27d744..d1a093cce 100755 --- a/tests/link_c_cxx.test +++ b/tests/link_c_cxx.test @@ -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 diff --git a/tests/link_dist.test b/tests/link_dist.test index 7e73cc3c9..661d6831e 100755 --- a/tests/link_dist.test +++ b/tests/link_dist.test @@ -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 diff --git a/tests/link_f90_only.test b/tests/link_f90_only.test index eeec3a682..979eb673d 100755 --- a/tests/link_f90_only.test +++ b/tests/link_f90_only.test @@ -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 diff --git a/tests/link_f_only.test b/tests/link_f_only.test index 4390bd6d8..c4df8cefb 100755 --- a/tests/link_f_only.test +++ b/tests/link_f_only.test @@ -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 diff --git a/tests/link_fc.test b/tests/link_fc.test index 5b23bd5aa..8c80f8c36 100755 --- a/tests/link_fc.test +++ b/tests/link_fc.test @@ -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 diff --git a/tests/link_fccxx.test b/tests/link_fccxx.test index bd2b21d25..30263d01e 100755 --- a/tests/link_fccxx.test +++ b/tests/link_fccxx.test @@ -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 diff --git a/tests/link_fcxx.test b/tests/link_fcxx.test index e86f7cd35..c75ffc74c 100755 --- a/tests/link_fcxx.test +++ b/tests/link_fcxx.test @@ -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