]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix testsuite to run with newer M4.
authorStepan Kasal <kasal@ucw.cz>
Mon, 11 Sep 2006 16:42:57 +0000 (16:42 +0000)
committerEric Blake <ebb9@byu.net>
Mon, 24 Mar 2008 20:38:44 +0000 (14:38 -0600)
* tests/local.at (AT_CHECK_M4): Fix this so that the testsuite
  works with GNU M4 1.4.3 again; make the normalized form
  match the current m4 message; fix the description.
* test/tools.at (autom4te cache): Adapt to the change.

(cherry picked from commit 8b65be1d1a9acef50b571246ef0877d46aacd435)

ChangeLog
tests/local.at
tests/tools.at

index bfcdb9f6ed658573ba19ac8b96ad227aac0697d1..090045dab295e816eb61d747bc0949fd47d3c8ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-11  Stepan Kasal  <kasal@ucw.cz>
+
+       * tests/local.at (AT_CHECK_M4): Fix this so that the testsuite
+         works with GNU M4 1.4.3 again; make the normalized form
+         match the current m4 message; fix the description.
+       * test/tools.at (autom4te cache): Adapt to the change.
+
 2008-03-24  Eric Blake  <ebb9@byu.net>
 
        Work with M4 1.6 change to FIFO m4wrap.
index 1494391b7a2a3e55137ebc86053e3af4525e93fc..0ac5d6435b631f95882b940e7158c85caf26af09 100644 (file)
@@ -1,6 +1,6 @@
 # M4 macros used in building Autoconf test suites.        -*- Autotest -*-
 
-# Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2003, 2008 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
@@ -33,26 +33,31 @@ AT_TESTED([autom4te autoconf autoheader autoupdate autoreconf ifnames])
 
 # AT_CHECK_AUTOM4TE(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
 # -----------------------------------------------------------
-# If stderr is specified, normalize the observed stderr.  E.g. (GNU M4 1.5):
+# If stderr is specified, normalize the observed stderr.
+# This (using GNU M4 1.4.6 or later)
 #
-#  /usr/local/bin/m4: script.4s: 1: Cannot open foo: No such file or directory
+#  /usr/local/bin/m4:script.4s:1: cannot open `foo': No such file or directory
 #  autom4te: /usr/local/bin/m4 failed with exit status: 1
 #
-# or (using gm4 as GNU M4 1.4):
+# or this (GNU M4 1.4 installed as gm4)
 #
 #  script.4s:1: /usr/local/bin/gm4: Cannot open foo: No such file or directory
 #  autom4te: /usr/local/bin/m4 failed with exit status: 1
 #
 # becomes
 #
-#  m4: script.4s: 1: Cannot open foo: No such file or directory
+#  m4:script.4s:1: cannot open `foo': No such file or directory
 #  autom4te: m4 failed with exit status: 1
 #
 # We use the following sed patterns:
 #
-#     (file): (line): (m4):
-# or  (m4): (file): (line):
-# to  m4: (file): (line):
+#     (m4): ?(file): ?(line):
+# or  (file): ?(line): ?(m4):
+# to  m4:(file):(line):
+#
+# and
+#     m4:(file):(line): Cannot open foo:
+# to  m4:(file):(line): cannot open `foo':
 #
 # and
 #     autom4te: [^ ]m4
@@ -60,12 +65,13 @@ AT_TESTED([autom4te autoconf autoheader autoupdate autoreconf ifnames])
 m4_define([AT_CHECK_AUTOM4TE],
 [AT_CHECK([autom4te $1], [$2], [$3], m4_ifval([$4], [stderr]))
 m4_ifval([$4],
-[AT_CHECK([[sed -e 's,^\([^:]*\): *\([0-9][0-9]*\): *[^:]*m4: ,m4: \1: \2: ,' \
-               -e 's,^[^:]*m4: *\([^:]*\): *\([0-9][0-9]*\): ,m4: \1: \2: ,' \
-               -e 's/^autom4te: [^ ]*m4 /autom4te: m4 /' \
-               -e 's/^autom4te: [^ ]*m4.exe /autom4te: m4 /' \
-               -e 's/ (E[A-Z]*)$//' \
-          stderr]], [0],[$4])])
+[AT_CHECK([[sed 's/^[^:]*m4: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/
+       s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4: /m4:\1\2 /
+       s/^\(m4:[^:]*:[0-9][0-9]*: \)C\(annot open \)\([^`:]*\):/\1c\2`\3'\'':/
+       s/^autom4te: [^ ]*m4 /autom4te: m4 /
+       s/^autom4te: [^ ]*m4\.exe /autom4te: m4 /
+       s/ (E[A-Z]*)$//
+    ' stderr]], [0],[$4])])
 ])
 
 
index 6516af1723de79c64f4bc4f7b659f3d8eb07db1e..3f6dc742881c4534af2cd33c2fdf99a8ad581174 100644 (file)
@@ -2,7 +2,7 @@
 
 AT_BANNER([Executables (autoheader, autoupdate...).])
 
-# Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2008 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
@@ -129,7 +129,7 @@ AT_CHECK_M4SUGAR
 mkdir sub
 mv foo sub
 AT_CHECK_M4SUGAR([], [1], [],
-[m4: script.4s: 1: Cannot open foo: No such file or directory
+[m4:script.4s:1: cannot open `foo': No such file or directory
 autom4te: m4 failed with exit status: 1
 ])