Hello Paul and Noah,
On Mon, Apr 10, 2006 at 12:42:59PM -0700, Paul Eggert wrote:
> Hmm, why are empty files an error? We currently have empty files.
Yes, you and Noah are right. I dropped that part of the patch.
On Mon, Apr 10, 2006 at 12:39:34PM -0700, Noah Misch wrote:
> On Mon, Apr 10, 2006 at 08:01:44PM +0200, Stepan Kasal wrote:
> > On Mon, Apr 10, 2006 at 02:41:38PM +0200, Ralf Wildenhues wrote:
> > > 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.
>
> If `mktests.sh' might be unportable, the trap helps. Suppose a user edits one
> of lib/autoconf/*.m4 in an effort to fix a bug on his/her platform. He or she
> then runs `make check', and `mktests.sh' stumbles. If it touches tests/*.at
> before exiting with an error, the user can run `make check' again and proceed
> with the test suite. Otherwise, the user can't use 'make check' until he or
> she
> also fixes `mktests.sh' for his/her system.
Yes, but OTOH, if the ``stumble'' prints ``To proceed run make check.'',
the user might think that this behaviour is expected, and may not report
the problem with mktests.sh.
We want portable mktests.sh, so it is good if problems with it are
reported, rather that silently hidden.
Updated patch attached.
Have a nice day,
Stepan
2006-04-10 Stepan Kasal <[EMAIL PROTECTED]>
* tests/mktests.sh: Use "trap '' 0", not "trap 0". Do not touch
the files if a problem appears. Make the empty *.at files
read-only, too. 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 19:52:12 -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
@@ -218,17 +214,17 @@
# check, output /rien du tout/[1].
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
fi
+ # Help people not to update these files by hand.
+ chmod a-w ac$base.at
done
rm -f acdefuns audefuns requires
-trap 0
+trap '' 0
exit 0
# [1] En franc,ais dans le texte.