autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-4-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-4-g31796ef
Date: Tue, 07 Apr 2009 03:01:33 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=31796ef9892ad6cb7648f4911fd110fa6a6c74cf

The branch, master has been updated
       via  31796ef9892ad6cb7648f4911fd110fa6a6c74cf (commit)
       via  c283f62edb0f6a38f035fe824baa8547a49d2a44 (commit)
       via  57e6f69b99f75f72049fc92b0143837747dc1c83 (commit)
      from  85cc7e8e7d1caefc5be949069a62e1bb536d3e64 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 31796ef9892ad6cb7648f4911fd110fa6a6c74cf
Author: Eric Blake <address@hidden>
Date:   Mon Mar 30 17:27:45 2009 -0600

    Reduce testsuite size.
    
    * tests/statesave.m4: New file.
    * tests/Makefile.am (EXTRA_DIST): Distribute it.
    * tests/local.at (AT_CONFIGURE_AC): Reuse file, rather than
    repeating inline definition of AC_STATE_SAVE.
    (AT_CHECK_ENV): Factor code...
    (_AT_CHECK_ENV): ...into shell function.
    * tests/m4sh.at (AT_DATA_LINENO): Avoid churn in testsuite.
    
    Signed-off-by: Eric Blake <address@hidden>

commit c283f62edb0f6a38f035fe824baa8547a49d2a44
Author: Eric Blake <address@hidden>
Date:   Mon Apr 6 12:13:02 2009 -0600

    Handle shell comments in AT_CHECK.
    
    * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in
    test correctly.  Latent bug in handling shell comment was first
    fixed 2008-11-20, but regressed two patches later.
    * tests/autotest.at (Shell comment in command): New test.
    * NEWS: Document the fix.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 57e6f69b99f75f72049fc92b0143837747dc1c83
Author: Eric Blake <address@hidden>
Date:   Mon Apr 6 10:40:49 2009 -0600

    Hard fail any test with syntax errors.
    
    * lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
    Guarantee test failure on syntax error, rather than inheriting
    status from previous test.
    * tests/autotest.at (Syntax error): New test.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |   24 ++++++++++++++++++++++
 NEWS                    |    7 ++++++
 lib/autotest/general.m4 |    7 +++--
 tests/Makefile.am       |    2 +-
 tests/autotest.at       |   28 +++++++++++++++++++++++--
 tests/local.at          |   50 ++++++++++++++--------------------------------
 tests/m4sh.at           |    6 ++--
 tests/statesave.m4      |   34 +++++++++++++++++++++++++++++++
 8 files changed, 113 insertions(+), 45 deletions(-)
 create mode 100644 tests/statesave.m4

diff --git a/ChangeLog b/ChangeLog
index f0f9296..4c0e3f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2009-04-06  Eric Blake  <address@hidden>
+
+       Reduce testsuite size.
+       * tests/statesave.m4: New file.
+       * tests/Makefile.am (EXTRA_DIST): Distribute it.
+       * tests/local.at (AT_CONFIGURE_AC): Reuse file, rather than
+       repeating inline definition of AC_STATE_SAVE.
+       (AT_CHECK_ENV): Factor code...
+       (_AT_CHECK_ENV): ...into shell function.
+       * tests/m4sh.at (AT_DATA_LINENO): Avoid churn in testsuite.
+
+       Handle shell comments in AT_CHECK.
+       * lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in
+       test correctly.  Latent bug in handling shell comment was first
+       fixed 2008-11-20, but regressed two patches later.
+       * tests/autotest.at (Shell comment in command): New test.
+       * NEWS: Document the fix.
+
+       Hard fail any test with syntax errors.
+       * lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
+       Guarantee test failure on syntax error, rather than inheriting
+       status from previous test.
+       * tests/autotest.at (Syntax error): New test.
+
 2009-03-31  Eric Blake  <address@hidden>
 
        Beta Release Version 2.63b.
diff --git a/NEWS b/NEWS
index 23110ac..e91fc39 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,12 @@
 GNU Autoconf NEWS - User visible changes.
 
+* Major changes in Autoconf 2.64 (2009-??-??) [stable]
+  Released by Eric Blake, based on git versions 2.63b.*.
+
+** Ensure AT_CHECK can support commands that include a # given with
+   proper m4 quoting.  For shell comments, this is a new feature; for
+   non-shell comments, this fixes a regression introduced in 2.63b.
+
 * Major changes in Autoconf 2.63b (2009-03-31) [beta]
   Released by Eric Blake, based on git versions 2.63.*.
 
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 86a5c6a..11a067c 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -1130,6 +1130,7 @@ at_fn_group_postprocess ()
       report this failure to <AT_PACKAGE_BUGREPORT>.
 _ATEOF
     AS_ECHO(["$at_setup_line"]) >"$at_check_line_file"
+    at_xfail=no at_status=99
   fi
   $at_verbose AS_ECHO_N(["$at_group. $at_setup_line: "])
   AS_ECHO_N(["$at_group. $at_setup_line: "]) >> "$at_group_log"
@@ -1903,7 +1904,7 @@ _AT_DEFINE_SETUP([AT_CHECK_NOESCAPE],
 
 # _AT_DECIDE_TRACEABLE(COMMANDS)
 # ------------------------------
-# Worker for for _AT_CHECK that expands to shell code.  If COMMANDS are safe to
+# Worker for _AT_CHECK that expands to shell code.  If COMMANDS are safe to
 # trace with `set -x', the shell code will evaluate to true.  Otherwise,
 # the shell code will print a message stating an aspect of COMMANDS that makes
 # tracing them unsafe, and evaluate to false.
@@ -1996,7 +1997,7 @@ at_fn_check_prepare_notrace],
 dnl We know at build time that tracing COMMANDS is always safe.
 [[at_fn_check_prepare_trace],]dnl
 dnl COMMANDS may contain parameter expansions; expand them at runtime.
-[[at_fn_check_prepare_dynamic "AS_ESCAPE([$1], [`\"])"])[]]dnl
+[[at_fn_check_prepare_dynamic "AS_ESCAPE([[$1]], [`\"])"])[]]dnl
 [_m4_popdef([at_reason])])
 
 
@@ -2042,7 +2043,7 @@ m4_define([AT_DIFF_STDOUT()],
 # filter out the unadorned trace lines, we disable shell tracing entirely for
 # commands that could span multiple lines.
 #
-# Limiting COMMANDS to a single command is not good either, since them
+# Limiting COMMANDS to a single command is not good either, since then
 # the user herself would use {} or (), and then we face the same problem.
 #
 # But then, there is no point in running
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 522236d..f07c553 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -21,7 +21,7 @@
 # But if you are borrowing from this file for setting up autotest in your
 # project, remember to distribute both testsuite and package.m4.
 EXTRA_DIST = $(TESTSUITE_AT) local.at mktests.sh \
-            atlocal.in wrapper.as
+            atlocal.in wrapper.as statesave.m4
 
 # Running the uninstalled scripts.  Build them upon `all', for the manpages.
 noinst_SCRIPTS = $(wrappers)
diff --git a/tests/autotest.at b/tests/autotest.at
index 1ed19a6..c5a8b58 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -236,9 +236,9 @@ AT_CLEANUP
 ]], [], [], [], [], [],
 [AT_CHECK([sed -n '/exec AS_MESSAGE_LOG_FD/q; />&AS_MESSAGE_LOG_FD/p' < 
micro-suite])])
 
-## ----------------------------------------------------- ##
-## Newlines and command substitutions in test commands.  ##
-## ----------------------------------------------------- ##
+## ----------------- ##
+## Status handling.  ##
+## ----------------- ##
 
 AT_CHECK_AT_TEST([Truth],
   [AT_CHECK([:], 0, [], [])])
@@ -253,6 +253,18 @@ AT_CHECK_AT_TEST([Skip],
   [], [], [], [], [],
   [AT_CHECK([grep skipped micro-suite.log], [], [ignore])])
 
+AT_CHECK_AT_TEST([Syntax error],
+  [AT_CHECK([:])
+   AT_CLEANUP
+   AT_SETUP([syntax])
+   AT_CHECK([if])
+   AT_CLEANUP
+   AT_SETUP([another test])
+   AT_CHECK([:])],
+  [], [1], [], [stderr], [],
+  [AT_CHECK([grep "unable to parse test group: 2" stderr], [0], [ignore])
+   AT_CHECK([$CONFIG_SHELL ./micro-suite 1 3], [0], [ignore])])
+
 AT_CHECK_AT_TEST([errexit],
   [AT_CHECK([false])
    AT_CLEANUP
@@ -265,6 +277,10 @@ AT_CHECK_AT_TEST([errexit],
    AT_CHECK([grep "1 .* inhibited subsequent" stderr], [], [ignore])],
   [--errexit])
 
+## ----------------------------------------------------- ##
+## Newlines and command substitutions in test commands.  ##
+## ----------------------------------------------------- ##
+
 AT_CHECK_AT_TEST([Literal multiline command],
   [AT_CHECK([echo Auto'
 'conf], 0, [Auto
@@ -306,6 +322,12 @@ bar
   [AT_NO_CMDSUBST])
 
 
+AT_CHECK_AT_TEST([Shell comment in command],
+  [my_echo=echo
+   AT_CHECK([$my_echo one [#] two], [], [one
+])])
+
+
 ## ------------------------- ##
 ## ${...} in test commands.  ##
 ## ------------------------- ##
diff --git a/tests/local.at b/tests/local.at
index fd451d1..9beea3a 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -189,37 +189,7 @@ m4_define([AT_DATA_AUTOCONF],
 # Create a full configure.ac running BODY, with a config header set up,
 # AC_OUTPUT, and environment checking hooks.
 m4_define([AT_CONFIGURE_AC],
-[AT_DATA_AUTOCONF([aclocal.m4],
-[[
-# AC_STATE_SAVE(FILE)
-# -------------------
-# Save the shell variables and directory listing.  AT_CHECK_ENV uses these to
-# confirm that no test modifies variables outside the Autoconf namespace or
-# leaves temporary files.  AT_CONFIG_CMP uses the variable dumps to confirm 
that
-# tests have the same side effects regardless of caching.
-#
-# The sed script duplicates uniq functionality (thanks to 'info sed
-# uniq' for the recipe), in order to avoid a MacOS 10.5 bug where
-# readdir can list a file multiple times in a rapidly changing
-# directory, while avoiding yet another fork.
-m4_defun([AC_STATE_SAVE],
-[(set) 2>&1 | sort >state-env.$][1
-ls | sed '/^at-/d;/^state-/d;/^config\./d
-  h
-  :b
-  $b
-  N
-  /^\(.*\)\n\1$/ {
-    g
-    bb
-  }
-  $b
-  P
-  D' >state-ls.$][1
-])# AC_STATE_SAVE
-]])
-
-AT_DATA([configure.ac],
+[AT_DATA([configure.ac],
 [[AC_INIT
 AC_CONFIG_HEADERS(config.h:config.hin)
 AC_STATE_SAVE(before)]
@@ -230,6 +200,7 @@ AC_STATE_SAVE(after)
 cp "$abs_top_srcdir/build-aux/install-sh" \
    "$abs_top_srcdir/build-aux/config.guess" \
    "$abs_top_srcdir/build-aux/config.sub" .
+cp "$abs_top_srcdir/tests/statesave.m4" aclocal.m4
 ])# AT_CONFIGURE_AC
 
 
@@ -303,10 +274,19 @@ m4_define([AT_CHECK_CONFIGURE],
 #      | '$'=6908
 #
 m4_define([AT_CHECK_ENV],
-[# Compare directory listings.
+[m4_divert_once([PREPARE_TESTS], [_AT_CHECK_ENV])dnl
+AT_CHECK([at_check_env])])
+m4_define([_AT_CHECK_ENV],
+[AS_FUNCTION_DESCRIBE([at_check_env], [],
+[Compare the directory and environment state both before and after a run,
+and return non-zero status if they differ inappropriately.])
+at_check_env ()
+{
+# Compare directory listings.
 test -f state-ls.before ||
   AS_ERROR([state-ls.before not present])
-test -f state-ls.after && { AT_CMP([state-ls.before], [state-ls.after]) }
+test -f state-ls.after \
+  && { $at_diff state-ls.before state-ls.after || return 1; }
 # Compare variable space dumps.
 if test -f state-env.before && test -f state-env.after; then
   for act_file in state-env.before state-env.after
@@ -336,9 +316,9 @@ if test -f state-env.before && test -f state-env.after; then
       # There may be variables spread on several lines; remove latter lines.
       $GREP '^m4_defn([m4_re_word])=' >clean-$act_file
   done
-  AT_CMP([clean-state-env.before], [clean-state-env.after])
+  $at_diff clean-state-env.before clean-state-env.after
 fi
-])
+} [#]at_check_env])
 
 
 # AT_CONFIG_CMP(VAR-FILE-A, VAR-FILE-B)
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 3664a3d..def63aa 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -2,8 +2,8 @@
 
 AT_BANNER([M4sh.])
 
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+# 2009 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
@@ -63,7 +63,7 @@ grep 'Line: .*$4' "$[0]" >/dev/null ||
   AS@&address@hidden([cannot find original script])
 exit 0
 ]])
-# If occurrences of $LINENO or __oline__ were wanted, create them.
+# If occurrences of $LINENO or __@&address@hidden were wanted, create them.
 sed 's/__LINENO__/$''LINENO/g;s/__OLINE__/__''oline__/g' $1.tas >$1.as
 AT_CHECK([autom4te -l m4sh $1.as -o $1])
 ])# AT_DATA_LINENO
diff --git a/tests/statesave.m4 b/tests/statesave.m4
new file mode 100644
index 0000000..30cedc2
--- /dev/null
+++ b/tests/statesave.m4
@@ -0,0 +1,34 @@
+# statesave.m4 serial 1
+
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+# 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AC_STATE_SAVE(FILE)
+# -------------------
+# Save the shell variables and directory listing.  AT_CHECK_ENV uses these to
+# confirm that no test modifies variables outside the Autoconf namespace or
+# leaves temporary files.  AT_CONFIG_CMP uses the variable dumps to confirm
+# that tests have the same side effects regardless of caching.
+#
+# The sed script duplicates uniq functionality (thanks to 'info sed
+# uniq' for the recipe), in order to avoid a MacOS 10.5 bug where
+# readdir can list a file multiple times in a rapidly changing
+# directory, while avoiding yet another fork.
+m4_defun([AC_STATE_SAVE],
+[(set) 2>&1 | sort >state-env.$1
+ls | sed '/^at-/d;/^state-/d;/^config\./d
+  h
+  :b
+  $b
+  N
+  /^\(.*\)\n\1$/ {
+    g
+    bb
+  }
+  $b
+  P
+  D' >state-ls.$1
+])# AC_STATE_SAVE


hooks/post-receive
--
GNU Autoconf source repository




reply via email to

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