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-82-


From: Paolo Bonzini
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-82-gac0fd19
Date: Mon, 13 Jul 2009 19:47:04 +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=ac0fd199f9027786bc4bb332f9f4116e8b1ffccf

The branch, master has been updated
       via  ac0fd199f9027786bc4bb332f9f4116e8b1ffccf (commit)
       via  93a2679e007e0d414178aaff14b654e8b1ad26bc (commit)
      from  81abbb1137c8f519c911b5edc264b281ccf4ce2a (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 ac0fd199f9027786bc4bb332f9f4116e8b1ffccf
Author: Paolo Bonzini <address@hidden>
Date:   Sun Jul 12 12:22:39 2009 +0200

    introduce AT_SKIP_IF and AT_FAIL_IF
    
    * NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
    * doc/autoconf.texi (Autotest): Document them.
    * lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
    AT_FAIL_IF, _AT_CHECK_EXIT): New.
    (AT_CHECK): Use _AT_LINE_ESCAPED.
    * tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
    Use AT_SKIP_IF.
    * tests/local.st: Use AT_SKIP_IF.

commit 93a2679e007e0d414178aaff14b654e8b1ad26bc
Author: Paolo Bonzini <address@hidden>
Date:   Sun Jul 12 13:50:24 2009 +0200

    use m4 -g when available
    
    M4sugar requires GNU m4 extensions to be enabled.  Override
    POSIXLY_CORRECT using -g.
    
    * m4/m4.m4: Unset POSIXLY_CORRECT during first test.  Test for -g.
    Warn user if he has POSIXLY_CORRECT set but -g is not supported.
    * bin/Makefile.am: Substitute @M4_GNU@ into generated files.
    * bin/autom4te.in: Pass @M4_GNU@ to m4.

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

Summary of changes:
 ChangeLog               |   20 +++++++++++++++++
 NEWS                    |    2 +-
 bin/Makefile.am         |    1 +
 bin/autom4te.in         |    2 +-
 doc/autoconf.texi       |   39 +++++++++++++++++++++++++++++++++
 lib/autotest/general.m4 |   46 +++++++++++++++++++++++++++++++++++++++-
 m4/m4.m4                |   22 ++++++++++++++++++-
 tests/autotest.at       |   54 +++++++++++++++++++++++++++++++++++++++++++++-
 tests/local.at          |    4 +-
 9 files changed, 182 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f5434bd..565b9e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2009-07-13  Paolo Bonzini  <address@hidden>
+
+       Introduce AT_SKIP_IF and AT_FAIL_IF
+       * NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
+       * doc/autoconf.texi (Autotest): Document them.
+       * lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
+       AT_FAIL_IF, _AT_CHECK_EXIT): New.
+       (AT_CHECK): Use _AT_LINE_ESCAPED.
+       * tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
+       Use AT_SKIP_IF.
+       * tests/local.st: Use AT_SKIP_IF.
+
+2009-07-13  Paolo Bonzini  <address@hidden>
+
+       Use m4 -g when available.
+       * m4/m4.m4: Unset POSIXLY_CORRECT during first test.  Test for -g.
+       Warn user if he has POSIXLY_CORRECT set but -g is not supported.
+       * bin/Makefile.am: Substitute @M4_GNU@ into generated files.
+       * bin/autom4te.in: Pass @M4_GNU@ to m4.
+
 2009-07-13  Eric Blake  <address@hidden>
 
        Fix previous patch.
diff --git a/NEWS b/NEWS
index 93a09c9..ef67c77 100644
--- a/NEWS
+++ b/NEWS
@@ -23,7 +23,7 @@ GNU Autoconf NEWS - User visible changes.
    ignore-nolog, stdout-nolog, and stderr-nolog.
 
 ** The following documented autotest macros are new:
-   AT_CHECK_UNQUOTED
+   AT_CHECK_UNQUOTED  AT_FAIL_IF  AT_SKIP_IF
 
 ** The following documented m4sugar macros are new:
    m4_argn  m4_copy_force  m4_default_nblank  m4_default_nblank_quoted
diff --git a/bin/Makefile.am b/bin/Makefile.am
index ba88ab0..da65b85 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -46,6 +46,7 @@ edit = sed \
        -e 's|@address@hidden|'`echo autom4te | sed '$(transform)'`'|g' \
        -e 's|@address@hidden|$(M4)|g' \
        -e 's|@address@hidden|$(M4_DEBUGFILE)|g' \
+       -e 's|@address@hidden|$(M4_GNU)|g' \
        -e 's|@address@hidden|$(AWK)|g' \
        -e 's|@address@hidden|'$(RELEASE_YEAR)'|g' \
        -e 's|@address@hidden|$(VERSION)|g' \
diff --git a/bin/autom4te.in b/bin/autom4te.in
index cf425bb..1baf507 100644
--- a/bin/autom4te.in
+++ b/bin/autom4te.in
@@ -463,7 +463,7 @@ sub handle_m4 ($@)
   #
   # We don't output directly to the cache files, to avoid problems
   # when we are interrupted (that leaves corrupted files).
-  xsystem ("$m4"
+  xsystem ("$m4 @M4_GNU@"
           . join (' --include=', '', map { shell_quote ($_) } @include)
           . ' --debug=aflq'
           . (!exists $ENV{'AUTOM4TE_NO_FATAL'} ? ' --fatal-warning' : '')
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 3528f53..0802c2a 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -22653,6 +22653,45 @@ If the current test group fails, log the contents of 
@var{file}.
 Several identical calls within one test group have no additional effect.
 @end defmac
 
address@hidden AT_FAIL_IF (@var{shell-condition})
address@hidden
+Make the test group fail, skipping the rest of its execution if
address@hidden is true.  @var{shell-condition} is a shell expression
+such as a @code{test} command.  Tests before @command{AT_FAIL_IF}
+will be executed and may still cause the test group to be skipped.
+You can instantiate this macro many times from within the same test group.
+
+You should use this macro only for very simple failure conditions.  If the
address@hidden could emit any kind of output you should instead
+use @command{AT_CHECK} like
address@hidden
+AT_CHECK(address@hidden || exit 99])
address@hidden example
address@hidden
+so that such output is properly recorded in the @file{testsuite.log}
+file.
address@hidden defmac
+
address@hidden AT_SKIP_IF (@var{shell-condition})
address@hidden
+Determine whether the test should be skipped because it requires
+features that are unsupported on the machine under test.
address@hidden is a shell expression such as a @code{test}
+command.  Tests before @command{AT_SKIP_IF} will be executed
+and may still cause the test group to fail.  You can instantiate this
+macro many times from within the same test group.
+
+You should use this macro only for very simple skip conditions.  If the
address@hidden could emit any kind of output you should instead
+use @command{AT_CHECK} like
address@hidden
+AT_CHECK(address@hidden || exit 77])
address@hidden example
address@hidden
+so that such output is properly recorded in the @file{testsuite.log}
+file.
address@hidden defmac
+
 @defmac AT_XFAIL_IF (@var{shell-condition})
 @atindex{XFAIL_IF}
 Determine whether the test is expected to fail because it is a known
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index 6032796..b9beb0e 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -168,6 +168,11 @@ m4_define([AT_LINE],
                         m4_bregexp(/__file__, [/\([^/]*\)$], [[\1]]))])])dnl
 m4_defn([_AT_LINE_base]):__line__])
 
+# _AT_LINE_ESCAPED
+# ----------------
+# Same as AT_LINE, but already escaped for the shell.
+m4_define([_AT_LINE_ESCAPED], ["AS_ESCAPE(m4_dquote(AT_LINE))"])
+
 
 # _AT_NORMALIZE_TEST_GROUP_NUMBER(SHELL-VAR)
 # ------------------------------------------
@@ -1775,6 +1780,36 @@ m4_divert_push([TEST_SCRIPT])dnl
 ])
 
 
+# AT_FAIL_IF(SHELL-EXPRESSION)
+# -----------------------------
+# Make the test die with hard failure if SHELL-EXPRESSION evaluates to
+# true (exitcode = 0).
+_AT_DEFINE_SETUP([AT_FAIL_IF],
+[dnl
+dnl Try to limit the amount of conditionals that we emit.
+m4_case([$1],
+      [], [],
+      [false], [],
+      [:], [_AT_CHECK_EXIT([], [99])],
+      [true], [_AT_CHECK_EXIT([], [99])],
+      [_AT_CHECK_EXIT([$1], [99])])])
+
+
+# AT_SKIP_IF(SHELL-EXPRESSION)
+# -----------------------------
+# Skip the rest of the group if SHELL-EXPRESSION evaluates to true
+# (exitcode = 0).
+_AT_DEFINE_SETUP([AT_SKIP_IF],
+[dnl
+dnl Try to limit the amount of conditionals that we emit.
+m4_case([$1],
+      [], [],
+      [false], [],
+      [:], [_AT_CHECK_EXIT([], [77])],
+      [true], [_AT_CHECK_EXIT([], [77])],
+      [_AT_CHECK_EXIT([$1], [77])])])
+
+
 # AT_XFAIL_IF(SHELL-EXPRESSION)
 # -----------------------------
 # Set up the test to be expected to fail if SHELL-EXPRESSION evaluates to
@@ -2090,7 +2125,7 @@ m4_define([_AT_CHECK],
 [m4_define([AT_ingroup])]dnl
 [{ set +x
 AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([[$1]])"])
-_AT_DECIDE_TRACEABLE([$1]) "AS_ESCAPE(m4_dquote(AT_LINE))"
+_AT_DECIDE_TRACEABLE([$1]) _AT_LINE_ESCAPED
 ( $at_check_trace; [$1]
 ) >>"$at_stdout" 2>>"$at_stderr"
 at_status=$? at_failed=false
@@ -2107,3 +2142,12 @@ m4_ifvaln([$5$6], [AS_IF($at_failed, [$5], [$6])])]dnl
 [$at_failed && at_fn_log_failure AT_capture_files
 $at_traceon; }
 ])# _AT_CHECK
+
+# _AT_CHECK_EXIT(COMMANDS, [EXIT-STATUS-IF-PASS])
+# -----------------------------------------------
+# Minimal version of _AT_CHECK for AT_SKIP_IF and AT_FAIL_IF.
+m4_define([_AT_CHECK_EXIT],
+[m4_define([AT_ingroup])]dnl
+[AS_ECHO(_AT_LINE_ESCAPED) >"$at_check_line_file"
+m4_ifval([$1], [($1) \
+  && ])at_fn_check_skip $2 "$at_srcdir/AT_LINE"])# _AT_CHECK_EXIT
diff --git a/m4/m4.m4 b/m4/m4.m4
index dd90cca..975f24a 100644
--- a/m4/m4.m4
+++ b/m4/m4.m4
@@ -1,4 +1,4 @@
-# m4.m4 serial 6
+# m4.m4 serial 7
 
 # Copyright (C) 2000, 2006, 2007, 2008, 2009 Free Software Foundation,
 # Inc.
@@ -20,6 +20,8 @@ AC_DEFUN([AC_PROG_GNU_M4],
     program of `m4', `gm4', or `gnum4' on PATH that meets Autoconf needs.])
   AC_CACHE_CHECK([for GNU M4 that supports accurate traces], [ac_cv_path_M4],
     [rm -f conftest.m4f
+ac_had_posixly_correct=${POSIXLY_CORRECT:+yes}
+AS_UNSET([POSIXLY_CORRECT])
 AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
       [dnl Creative quoting here to avoid raw dnl and ifdef in configure.
       # Root out GNU M4 1.4.4, as well as non-GNU m4 that ignore -t, -F.
@@ -32,6 +34,24 @@ AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
       [AC_MSG_ERROR([no acceptable m4 could be found in \$PATH.
 GNU M4 1.4.5 or later is required; 1.4.11 is recommended])])])
   M4=$ac_cv_path_M4
+  AC_CACHE_CHECK([whether $ac_cv_path_M4 accepts -g], [ac_cv_prog_gnu_m4_gnu],
+    [case `$M4 --help < /dev/null 2>&1` in
+      *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;;
+      *) ac_cv_prog_gnu_m4_gnu=no ;;
+    esac])
+  if test "$ac_cv_prog_gnu_m4_gnu" = yes; then
+    M4_GNU=-g
+  else
+    M4_GNU=
+  fi
+  AC_SUBST([M4_GNU])
+  if test x$ac_had_posixly_correct = xyes; then
+    POSIXLY_CORRECT=:
+    if test $ac_cv_prog_gnu_m4_gnu = no; then
+      AC_MSG_WARN([The version of M4 that was found does not support -g.])
+      AC_MSG_WARN([Using it with POSIXLY_CORRECT set may cause problems.])
+    fi
+  fi
   AC_CACHE_CHECK([how m4 supports trace files], [ac_cv_prog_gnu_m4_debugfile],
     [case `$M4 --help < /dev/null 2>&1` in
       *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;;
diff --git a/tests/autotest.at b/tests/autotest.at
index 438c01d..0063c4a 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -169,6 +169,16 @@ AT_SETUP([only test])
 AT_CHECK([:])
 ]], [missing AT@&address@hidden detected])
 
+AT_CHECK_AT_SYNTAX([AT@&address@hidden without AT@&address@hidden,
+[[AT_INIT([incomplete test suite])
+AT_FAIL_IF([:])
+]], [AT@&address@hidden: missing AT@&address@hidden detected])
+
+AT_CHECK_AT_SYNTAX([AT@&address@hidden without AT@&address@hidden,
+[[AT_INIT([incomplete test suite])
+AT_SKIP_IF([:])
+]], [AT@&address@hidden: missing AT@&address@hidden detected])
+
 AT_CHECK_AT_SYNTAX([AT@&address@hidden without AT@&address@hidden,
 [[AT_INIT([incomplete test suite])
 AT_CHECK([:])
@@ -263,6 +273,46 @@ AT_CHECK_AT_TEST([Hard fail],
   [AT_CHECK([grep '2 failed unexpectedly' micro-suite.log], [], [ignore])
    AT_CHECK([grep ok micro-suite.log], [1])])
 
+AT_CHECK_AT_TEST([AT@&address@hidden,
+  [AT_FAIL_IF([:])
+  AT_CLEANUP
+  AT_SETUP
+  AT_FAIL_IF([false])
+  AT_CLEANUP
+  AT_SETUP
+  AT_FAIL_IF([test x = y])
+  AT_CLEANUP
+  AT_SETUP
+  AT_FAIL_IF([bah])
+  AT_CLEANUP
+  AT_SETUP
+  AT_FAIL_IF([test x = x])
+  AT_CLEANUP
+  AT_SETUP
+  AT_FAIL_IF([test $foo = x])],
+  [], [1], [stdout], [ignore], [],
+  [AT_CHECK([grep '1 5 failed' stdout], [], [ignore], [ignore])])
+
+AT_CHECK_AT_TEST([AT@&address@hidden,
+  [AT_SKIP_IF([:])
+  AT_CLEANUP
+  AT_SETUP
+  AT_SKIP_IF([false])
+  AT_CLEANUP
+  AT_SETUP
+  AT_SKIP_IF([test x = y])
+  AT_CLEANUP
+  AT_SETUP
+  AT_SKIP_IF([bah])
+  AT_CLEANUP
+  AT_SETUP
+  AT_SKIP_IF([test x = x])
+  AT_CLEANUP
+  AT_SETUP
+  AT_SKIP_IF([test $foo = x])],
+  [], [], [], [], [],
+  [AT_CHECK([grep '2.*skipped' micro-suite.log], [], [ignore], [ignore])])
+
 AT_CHECK_AT_TEST([Syntax error],
   [AT_CHECK([:])
    AT_CLEANUP
@@ -990,8 +1040,8 @@ m4_define([AT_SKIP_PARALLEL_TESTS],
 [# Per BUGS, we have not yet figured out how to run parallel tests cleanly
 # under dash and some ksh variants.  For now, only run this test under
 # limited conditions; help is appreciated in widening this test base.
-AT_CHECK([${CONFIG_SHELL-$SHELL} -c 'test -n "${BASH_VERSION+set}]]dnl
-[[${ZSH_VERSION+set}${TEST_PARALLEL_AUTOTEST+set}"' || exit 77])
+AT_SKIP_IF([${CONFIG_SHELL-$SHELL} -c 'test -z "${BASH_VERSION+set}]]dnl
+[[${ZSH_VERSION+set}${TEST_PARALLEL_AUTOTEST+set}"'])
 # The parallel scheduler requires mkfifo and job control to work.
 AT_CHECK([mkfifo fifo || exit 77])
 AT_CHECK([${CONFIG_SHELL-$SHELL} -c '(set -m && set +m) || exit 77'],
diff --git a/tests/local.at b/tests/local.at
index 9beea3a..8a81835 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -50,8 +50,8 @@ AT_CHECK([$at_diff "$1" "$2"])
 # If the shell handles `-n' well, use it to check the syntax of PROGRAM;
 # otherwise, do nothing.
 m4_define([AT_CHECK_SHELL_SYNTAX],
-[AS_IF([test "$ac_cv_sh_n_works" = yes],
-  [AT_CHECK([/bin/sh -n $1])])])
+[AT_SKIP_IF([test "$ac_cv_sh_n_works" != yes])
+AT_CHECK([/bin/sh -n $1])])
 
 m4_define([AT_CHECK_PERL_SYNTAX],
 [AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c 
"$abs_top_builddir"/bin/$1],


hooks/post-receive
-- 
GNU Autoconf source repository




reply via email to

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