From e0c89b9a0768516b8f67a33af15838679821ee3b Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 8 Jun 2010 21:23:08 +0200 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ tests/testsuite.at | 16 +++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1a58fa7..0ce3ca00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-06-08 Ralf Wildenhues + 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. diff --git a/tests/testsuite.at b/tests/testsuite.at index 7f9afe90..71b9dc47 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 ])