autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Ignore errors from ./run on w32.


From: Eric Blake
Subject: Re: [PATCH] Ignore errors from ./run on w32.
Date: Tue, 4 Mar 2008 23:32:48 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Hi Ralf,

Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

> > I noticed that I couldn't do:
> > 
> > some_test || AT_CHECK()
> > 
> > since AT_CHECK() expands to "statements;" rather than "{ statements; }".  
> > Should we make AT_CHECK an inlineable statement group?
> 
> Sounds good to me.

Done and tested (via the location where I originally noticed the issue):

From: Eric Blake <address@hidden>
Date: Tue, 4 Mar 2008 16:29:23 -0700
Subject: [PATCH] Make AT_CHECK act like a simple command.

* lib/autotest/general.m4 (_AT_CHECK): Wrap commands in {;}.
* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Test it.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog               |    4 ++++
 lib/autotest/general.m4 |    4 ++--
 tests/torture.at        |    7 ++-----
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2a73baa..e35dcd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-03-04  Eric Blake  <address@hidden>
 
+       Make AT_CHECK act like a simple command.
+       * lib/autotest/general.m4 (_AT_CHECK): Wrap commands in {;}.
+       * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Test it.
+
        Pull in recent maintainer improvements from coreutils.
        * GNUmakefile (_is-dist-target): 'make distclean' should not
        trigger autoreconf.
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index e8ca1dd..98cceae 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -1717,7 +1717,7 @@ m4_define([AT_DIFF_STDOUT()],
 #  ( $at_traceon; $1 ) >at-stdout 2>at-stder1
 #
 m4_define([_AT_CHECK],
-[$at_traceoff
+[{ $at_traceoff
 AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([$1])"])
 echo AT_LINE >"$at_check_line_file"
 
@@ -1739,5 +1739,5 @@ m4_if([$2], [ignore], [at_func_check_skip],
   [at_func_check_status m4_default([$2], [0])]) $at_status "$at_srcdir/AT_LINE"
 AS_IF($at_failed, [$5], [$6])
 $at_failed && at_func_log_failure AT_capture_files
-$at_traceon
+$at_traceon; }
 ])# _AT_CHECK
diff --git a/tests/torture.at b/tests/torture.at
index d8ae8f3..bba5693 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -215,11 +215,8 @@ AT_CHECK_CONFIGURE([what_to_test=var-$1 --no-create])
 # run by root or on w32).
 touch t
 chmod a-w .
-if mv t t1 >/dev/null 2>&1 ; then
-  :
-else
-  AT_CHECK([./config.status var-$1 </dev/null], [1], [ignore], [ignore])
-fi
+mv t t1 >/dev/null 2>&1 \
+  || AT_CHECK([./config.status var-$1 </dev/null], [1], [ignore], [ignore])
 chmod u+w .
 rm -rf t t1
 ])# AT_CHECK_CONFIG_CREATION_NOWRITE
-- 
1.5.4







reply via email to

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