[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Libtool head: LT_AT_EXEC_CHECK drops exit status
From: |
Peter Ekberg |
Subject: |
FYI: Libtool head: LT_AT_EXEC_CHECK drops exit status |
Date: |
Fri, 16 Sep 2005 10:35:33 +0200 |
* Ralf Wildenhues wrote on Friday, September 16, 2005 10:28 CEST:
> Hi Peter,
>
> * Peter Ekberg wrote on Fri, Sep 16, 2005 at 10:04:07AM CEST:
> >
> > I have realized that LT_AT_EXEC_CHECK destroys the
> > exit status from the tested program so that AT_CHECK
> > is always satisfied with it.
> >
> > * tests/testsuite.at (LT_AT_EXEC_CHECK): Make sure
> > that the exit status of the tested program is
> > propagated as the exit status of the expression
> > fed to AT_CHECK.
> >
> > I don't know if AT_CHECK is designed to handle a list of
> > semicolon separated commands, so I don't know if this
> > patch is correct. It works much better than the current
> > version though...
>
> Yes, it is. Please install, but rename at_status to lt_status, we
> should not infringe upon Autotest's namespace. By the way, it also
> mistreats its third and fourth arguments in some cases, I believe.
> We could either add some m4_case machinery to fix this or just decide
> they should be `ignore,ignore' anyway..
>
> Thanks for the patch!
Applied this:
Index: tests/testsuite.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/testsuite.at,v
retrieving revision 1.18
diff -u -r1.18 testsuite.at
--- tests/testsuite.at 12 Sep 2005 12:48:38 -0000 1.18
+++ tests/testsuite.at 16 Sep 2005 07:57:16 -0000
@@ -57,10 +57,10 @@
# LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR])
# --------------------------------------------------------------
m4_define([LT_AT_EXEC_CHECK],
-[AT_CHECK([if $1; then :;
+[AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
elif test "X$host" != "X$build" && \
{ test -x "$1" || test -x "$1"$EXEEXT; }
- then (exit 77); fi],[$2],[$3],[$4])
+ then (exit 77); else (exit $lt_status); fi],[$2],[$3],[$4])
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Libtool head: LT_AT_EXEC_CHECK drops exit status,
Peter Ekberg <=