automake-patches
[Top][All Lists]
Advanced

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

[PATCH] Fix bug in test missing6.test


From: Stefano Lattarini
Subject: [PATCH] Fix bug in test missing6.test
Date: Fri, 27 Aug 2010 18:30:12 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Hello automakers.

The tests missing6.test in its current form produces broken configure and
config.status scripts; more precisely, it's the sed script for $LINENO
subtitution that is broken, since the sed command `b' got substituted with
the string `oops'.

(Just for the record, I found this bug while running the automake
testsuite with CONFIG_SHELL=dash).

The attached patch fixes the problem.  I checked its correctness by
temporarly reverting the change that fixed the bug tested by missing6.test
(git commit `680877cce6a85e0a55a7659048c0431109f964b7'), and verifying
that in such case `missing6.test' fails as expected.

OK for maint?

Regards,
  Stefano
From 529421a033c9937a853ef0a315a57f230c3a3bc4 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Fri, 27 Aug 2010 18:25:17 +0200
Subject: [PATCH] Fix bug in test missing6.test.

* tests/missing6.test: Fix the hack used to edit `configure.in',
to avoid producing a configure script that breaks with shells
that do not support $LINENO.  Also throw in a couple of cosmetic
changes.
---
 ChangeLog           |    8 ++++++++
 tests/missing6.test |    9 ++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 98011dc..688f4be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-08-27  Stefano Lattarini  <address@hidden>
+
+       Fix bug in test missing6.test.
+       * tests/missing6.test: Fix the hack used to edit `configure.in',
+       to avoid producing a configure script that breaks with shells
+       that do not support $LINENO.  Also throw in a couple of cosmetic
+       changes.
+
 2010-08-21  Ralf Wildenhues  <address@hidden>
 
        Improve robustness of mdate-sh script.
diff --git a/tests/missing6.test b/tests/missing6.test
index 3994b85..e543697 100755
--- a/tests/missing6.test
+++ b/tests/missing6.test
@@ -22,7 +22,7 @@ set -e
 
 {
   echo 'm4_define([AC_AUTOCONF_VERSION], [9999a])'
-  echo 'm4_define([b], [oops])'
+  echo 'dnl!! m4_define([a], [oops])'
   cat configure.in
   echo AC_OUTPUT
 } >configure.ac
@@ -39,10 +39,9 @@ $AUTOMAKE
 ./configure
 $MAKE
 
-sed 's/\[b\]/[a]/' < configure.ac > configure.tmp
-cmp configure.ac configure.tmp && Exit 1
-
-mv configure.tmp configure.ac
+sed 's/^dnl!! //' < configure.ac > configure.tmp
+cmp configure.ac configure.tmp && Exit 99 # sanity check
+mv -f configure.tmp configure.ac
 
 $MAKE 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
-- 
1.7.1


reply via email to

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