automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] Use `set -e' in confsub.test (avoid false negatives).


From: Stefano Lattarini
Subject: Re: [PATCH 1/2] Use `set -e' in confsub.test (avoid false negatives).
Date: Fri, 9 Apr 2010 19:25:31 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.2; i686; ; )

> * tests/confsub.test: ... Also, bumped copyright years.
Which I forgot to do.  Sigh.

An amended patch is attached.

Sorry for the noise,
       Stefano
From bd11ce65f4c8d0e4af29d6203f6e53c10cbf35f8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Fri, 9 Apr 2010 18:24:34 +0200
Subject: [PATCH 1/2] Use `set -e' in confsub.test (avoid false negatives).

* tests/confsub.test: Enable shell `errexit' flag, and related
changes (this helps avoiding some possible minor false negatives).
Also, bumped copyright years.

No portability problems should be introduced, since the test script
uses mostly simple commands (no shell functions, no shell control
structures and almost no compound commands); the only exception is
a compound command whose purpose is to cause the test to fail if
unexpected text is found in a generated Makefile.in:
  ($FGREP ... subdir/Makefile.in | $FGREP -v ...) && Exit 1
However, we don't expect this to cause problems, as similar commands
are already used anyway in test script using the `errexit' flag',
such as nolink.test:
  grep '^meal.*:' Makefile.in | grep -v beef.meat && Exit 1
and color.test:
  cat stdout | grep ": pass" | $FGREP "$grn" && Exit 1
---
 ChangeLog          |    7 +++++++
 tests/confsub.test |   20 ++++++++++----------
 2 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a5b5426..c23ac81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-09  Stefano Lattarini  <address@hidden>
+
+       Use `set -e' in confsub.test (avoids possible false negatives).
+       * tests/confsub.test: Enable shell `errexit' flag, and related
+       changes (this helps avoiding some possible minor false negatives).
+       Also, bumped copyright years.
+
 2010-04-04  Stefano Lattarini  <address@hidden>
 
        Generated tests are now just a thin layer around other tests.
diff --git a/tests/confsub.test b/tests/confsub.test
index 40c90c5..5703bd9 100755
--- a/tests/confsub.test
+++ b/tests/confsub.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 2000, 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,6 +20,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -37,8 +39,8 @@ END
 
 echo 'Before.' > subdir/config.hin
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # Make sure subdir Makefile.in doesn't itself look in the subdir.
 # One line is allowed though:
@@ -47,13 +49,11 @@ $AUTOMAKE || Exit 1
 ($FGREP 'subdir/config.h' subdir/Makefile.in |
    $FGREP -v 'cd $(top_builddir)') && Exit 1
 
-$AUTOCONF || Exit 1
-./configure || Exit 1
+$AUTOCONF
+./configure
 $FGREP 'Before.' subdir/config.h
 
 $sleep
 echo 'After.' > subdir/config.hin
-$MAKE || Exit 1
-$FGREP 'After.' subdir/config.h || Exit 1
-
-Exit 0
+$MAKE
+$FGREP 'After.' subdir/config.h
-- 
1.6.5


reply via email to

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