automake-patches
[Top][All Lists]
Advanced

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

[PATCH] Enable `errexit' shell flag in all tests cxx*.test.


From: Stefano Lattarini
Subject: [PATCH] Enable `errexit' shell flag in all tests cxx*.test.
Date: Tue, 27 Apr 2010 12:40:44 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

Hello automakers.

Here is another simple patch which ought to make the use of the 
`errexit' shell flag in the testsuite more consistent.

Regards,
    Stefano

-*-*-

Enable `errexit' shell flag in all tests cxx*.test.

* tests/cxx.test: Add call to `set -e'.  Related changes.
Bumped copyright years.
* tests/cxxansi.test: Likewise.
* tests/cxxcpp.test: Likewise.
* tests/cxxlibobj.test: Likewise.
* tests/cxxlink.test: Likewise.
* tests/cxxo.test: Likewise.

-*-*-

No portability problems should be introduced, since the modified test
scripts use only simple commands (no command substitution, no compound
command, no shell function), and the only additional relevant changes
were those which turned the lines:
  $ACLOCAL || Exit 1
  $AUTOMAKE || Exit 1
  $FGREP <string> <file(s)> || Exit 1
respectively into the lines:
  $ACLOCAL
  $AUTOMAKE
  $FGREP <string> <file(s)>
and this shouldn't cause false negatives, unless maybe on extremely
broken shells.

-*-*-
From f7c4e1b973d9c9d975942a974c9a42362ac7508d Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Tue, 27 Apr 2010 12:33:32 +0200
Subject: [PATCH] Enable `errexit' shell flag in all tests cxx*.test.

* tests/cxx.test: Add call to `set -e'.  Related changes.
Bumped copyright years.
* tests/cxxansi.test: Likewise.
* tests/cxxcpp.test: Likewise.
* tests/cxxlibobj.test: Likewise.
* tests/cxxlink.test: Likewise.
* tests/cxxo.test: Likewise.
---
 ChangeLog            |   11 +++++++++++
 tests/cxx.test       |    8 +++++---
 tests/cxxansi.test   |   10 ++++++----
 tests/cxxcpp.test    |    9 +++++----
 tests/cxxlibobj.test |    8 +++++---
 tests/cxxlink.test   |    8 +++++---
 tests/cxxo.test      |    8 +++++---
 7 files changed, 42 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 71b0d9b..38f799a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-04-27  Stefano Lattarini  <address@hidden>
+
+       Enable `errexit' shell flag in all tests cxx*.test.
+       * tests/cxx.test: Enabled `errexit' shell flag, and related
+       minor changes.
+       * tests/cxxansi.test: Likewise.
+       * tests/cxxcpp.test: Likewise.
+       * tests/cxxlibobj.test: Likewise.
+       * tests/cxxlink.test: Likewise.
+       * tests/cxxo.test: Likewise.
+
 2010-04-25  Ralf Wildenhues  <address@hidden>
 
        Warning and error message formatting cleanups.
diff --git a/tests/cxx.test b/tests/cxx.test
index 2105c00..aa2f225 100755
--- a/tests/cxx.test
+++ b/tests/cxx.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
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CXX
 END
@@ -28,7 +30,7 @@ bin_PROGRAMS = hello
 hello_SOURCES = hello.c++
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^\.SUFFIXES:.*c[+][+]' Makefile.in
diff --git a/tests/cxxansi.test b/tests/cxxansi.test
index da8bd6b..8bbe9b2 100755
--- a/tests/cxxansi.test
+++ b/tests/cxxansi.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
@@ -19,6 +19,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CXX
 AM_C_PROTOTYPES
@@ -36,10 +38,10 @@ END
 : > doe.C
 : > jane.C
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 $FGREP 'jane$U' Makefile.in && Exit 1
-$FGREP 'doe$U' Makefile.in || Exit 1
+$FGREP 'doe$U' Makefile.in
 
 Exit 0
diff --git a/tests/cxxcpp.test b/tests/cxxcpp.test
index 257505f..09bb4eb 100755
--- a/tests/cxxcpp.test
+++ b/tests/cxxcpp.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
@@ -18,14 +18,15 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CXXCPP
 END
 
-
 : > Makefile.am
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep '^CXXCPP' Makefile.in
diff --git a/tests/cxxlibobj.test b/tests/cxxlibobj.test
index 82f9e85..5f5ee30 100755
--- a/tests/cxxlibobj.test
+++ b/tests/cxxlibobj.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1997, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1997, 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
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CXX
 AC_PROG_CC
@@ -34,7 +36,7 @@ END
 : > doe.C
 : > jane.C
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 grep CC Makefile.in
diff --git a/tests/cxxlink.test b/tests/cxxlink.test
index b7a86f0..66b3d29 100755
--- a/tests/cxxlink.test
+++ b/tests/cxxlink.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
@@ -18,6 +18,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_CXX
@@ -31,8 +33,8 @@ END
 : > lava.c
 : > lamp.cxx
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # Look for this macro not at the beginning of any line; that will have
 # to be good enough for now.
diff --git a/tests/cxxo.test b/tests/cxxo.test
index 116df06..a69fb2a 100755
--- a/tests/cxxo.test
+++ b/tests/cxxo.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
@@ -17,6 +17,8 @@
 # Make sure C++ files are rewritten to ".o" and not just "o".
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CXX
 END
@@ -28,7 +30,7 @@ END
 
 : > doe.C
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 $FGREP 'doe.$(OBJEXT)' Makefile.in
-- 
1.6.5


reply via email to

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