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.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
Ralf Wildenhues 2010-06-08 21:23:08 +02:00
parent eb399e6a03
commit e0c89b9a07
2 changed files with 14 additions and 9 deletions

View File

@ -1,5 +1,12 @@
2010-06-08 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
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.
Avoid autom4te warning about unnamed diversion.
* libltdl/config/getopt.m4sh: Use diversion name KILL not -1.

View File

@ -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
])