Hi,

On Mon, Apr 10, 2006 at 02:41:38PM +0200, Ralf Wildenhues wrote:
> > > Dangerous.  [...]
...
> > This change simplifies tests/Makefile.am, so I tend to like it.
> 
> This statement is a direct argument to skip this for 2.60: no
> simplifications now, only actual bug fixes.

sure.  You told me during one of our phone calls: ``it's not going in''.
I assumed it's settled and I never meant to question it.

> > And what about ``testsuite.new''?
> 
> That's better.

Will be in a future version of my patch; after 2.60.

> > > You forgot to adjust the part in the trap.
> > 
> > I thought that the trap code is OK (it is triggered by the `exit 1').
> > What have I missed.
> 
> The trap code touches several files.  Isn't that wrong for them to have
> new time stamps in the error case?

Yes, you are right.

(I also noted that the trap uses "for file ; do..." while all the rest
of the script uses "for file in $src; do"...)

Perhaps the following changes should go in right now?
1) mktests.sh no longer tolarates bugs
2) thus the trap doesn't touch the *.at files
3) "trap '' 0" might be more portable

Attaches please find a proposed patch, to be committed right now.

Stepan Kasal
2006-04-10  Stepan Kasal  <[EMAIL PROTECTED]>

        * tests/mktests.sh: Use "test '' 0", not "test 0".  Do not touch
        the files if a problem appears.  If *.at is going to be empty,
        exit with an error.  Proposed by Ralf Wildenhues.

Index: tests/mktests.sh
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/mktests.sh,v
retrieving revision 1.53
diff -u -r1.53 mktests.sh
--- tests/mktests.sh    8 Apr 2006 21:44:13 -0000       1.53
+++ tests/mktests.sh    10 Apr 2006 18:01:04 -0000
@@ -25,13 +25,9 @@
 
 as_me=`echo "$0" | sed 's,.*[\\/],,'`
 
-trap 'echo "'"$as_me"': failed.  To proceed run make check." >&2
+trap 'echo "'"$as_me"': failed." >&2
       rm -f acdefuns audefuns requires *.tat
-      for file
-      do
-        touch `echo "$file" | sed "s,.*[\\/],,;s/\..*/.at/"`
-      done
-      trap 0
+      trap "" 0
       exit 1' \
      0 1 2 15
 
@@ -213,22 +209,19 @@
     comm -23 audefuns requires | sed 's/.*/AT_CHECK_AU_MACRO([&])/'
   } >ac$base.tat
 
-  # In one atomic step so that if something above fails, the trap
-  # preserves the old version of the file.  If there is nothing to
-  # check, output /rien du tout/[1].
+  # In one atomic step so that if something above fails, the old
+  # version of the file is preserved.
   if grep AT_CHECK ac$base.tat >/dev/null 2>&1; then
     mv -f ac$base.tat ac$base.at
     # Help people not to update these files by hand.
     chmod a-w ac$base.at
   else
-    rm -f ac$base.tat ac$base.at
-    touch ac$base.at
+    # Something went wrong.
+    exit 1
   fi
 done
 
 rm -f acdefuns audefuns requires
 
-trap 0
+trap '' 0
 exit 0
-
-# [1] En franc,ais dans le texte.

Reply via email to