[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LT_AT_MAKE doesn't terminate the test on failure.
From: |
Ralf Wildenhues |
Subject: |
Re: LT_AT_MAKE doesn't terminate the test on failure. |
Date: |
Tue, 8 Jun 2010 19:35:02 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
* Peter Rosin wrote on Tue, Jun 08, 2010 at 03:07:05PM CEST:
> Sorry to reply to self, but the issue is that there is a subshell in
> LT_AT_MAKE (there's one in LT_AT_CONFIGURE too) which stops the
> exit from propagating all the way to where it's supposed to.
Good observation! I really wonder how I managed to overlook that for so
long.
> Maybe adding the following after the end bracket of the sub-shells
> in those two macros is acceptable?
>
> $at_failed && at_fn_log_failure
No, that is definitely too much internals for my taste.
This patch should work however. OK?
Thanks,
Ralf
Fix testsuite helper macros to not hide failure.
* tests/testsuite.at (LT_AT_CONFIGURE, LT_AT_MAKE):
Do not wrap AT_CHECK in a subshell, so that failures are
properly propagated; instead, move environment changes inside
the AT_CHECK code.
Report and analysis by Peter Rosin.
diff --git a/tests/testsuite.at b/tests/testsuite.at
index ea092fc..da5463b 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -151,21 +151,19 @@ AT_KEYWORDS([autoconf automake])
# LT_AT_CONFIGURE([OPTIONS])
# --------------------------
m4_define([LT_AT_CONFIGURE],
-[( SHELL=${CONFIG_SHELL-/bin/sh}
- AT_CHECK([CONFIG_SHELL=$SHELL $SHELL ./configure $configure_options $1],
- [0], [ignore], [ignore])
- )
+[AT_CHECK([: ${CONFIG_SHELL=/bin/sh}; export CONFIG_SHELL; ]dnl
+ [$CONFIG_SHELL ./configure $configure_options $1],
+ [0], [ignore], [ignore])
])
# LT_AT_MAKE([TGTS], [VARS])
# --------------------------
m4_define([LT_AT_MAKE],
-[( $unset LIBTOOL LIBTOOLIZE
- for target in m4_default([$1], [all])
- do
- AT_CHECK([$MAKE $target $2], [0], [ignore], [ignore])
- done )
+[for target in m4_default([$1], [all])
+do
+ AT_CHECK([$unset LIBTOOL LIBTOOLIZE; $MAKE $target $2], [0], [ignore],
[ignore])
+done
])