From: Akim Demaille Date: Tue, 19 Dec 2000 08:15:20 +0000 (+0000) Subject: * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and X-Git-Tag: autoconf-2.50~298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fd0f6597d08cd9ed3b77d2539d5186baacd6459;p=thirdparty%2Fautoconf.git * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and if-not-failed. * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to dump config.log when configure failed. Before, the log was reported only on success. --- diff --git a/ChangeLog b/ChangeLog index 46d0eb3c4..ca68c1bc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-12-19 Akim Demaille + + * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and + if-not-failed. + * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to + dump config.log when configure failed. Before, the log was + reported only on success. + 2000-12-19 Akim Demaille * tests/foreign.at: New file. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 433fd1ec1..3cdc385c0 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -433,21 +433,21 @@ $at_traceon ( $1 ) >stdout 2>stderr at_status=$? $at_traceoff -at_continue=: +at_failed=false dnl Check stderr. m4_case([$4], ignore, [cat stderr >&5], experr, [AT_CLEANUP_FILE([experr])dnl -$at_diff experr stderr >&5 || at_continue='exit 1'], - [], [$at_diff empty stderr >&5 || at_continue='exit 1'], - [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_continue='exit 1']) +$at_diff experr stderr >&5 || at_failed=:], + [], [$at_diff empty stderr >&5 || at_failed=:], + [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_failed=:]) dnl Check stdout. m4_case([$3], ignore, [cat stdout >&5], expout, [AT_CLEANUP_FILES([expout])dnl -$at_diff expout stdout >&5 || at_continue='exit 1'], - [], [$at_diff empty stdout >&5 || at_continue='exit 1'], - [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1']) +$at_diff expout stdout >&5 || at_failed=:], + [], [$at_diff empty stdout >&5 || at_failed=:], + [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_failed=:]) dnl Check exit val. case $at_status in 77) exit 77;; @@ -456,8 +456,9 @@ m4_case([$2], [ *);;], [ m4_default([$2], [0])) ;; *) $at_verbose "Exit code was $at_status, expected $2" >&2 - at_continue='exit 1';;]) + at_failed=:;;]) esac -$at_continue +AS_IFELSE($at_failed, [$5], [$6]) +$at_failed && exit 1 $at_traceon ])# AT_CHECK diff --git a/tests/Makefile.in b/tests/Makefile.in index e98b48c84..8260da0a9 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -84,7 +84,7 @@ DISTCLEANFILES = atconfig testsuite mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = atconfig DIST_COMMON = README Makefile.am Makefile.in atconfig.in config.guess \ -config.sub ltconfig ltmain.sh +config.sub configure configure.in ltconfig ltmain.sh PACKAGE = @PACKAGE@ diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4 index 433fd1ec1..3cdc385c0 100644 --- a/tests/atgeneral.m4 +++ b/tests/atgeneral.m4 @@ -433,21 +433,21 @@ $at_traceon ( $1 ) >stdout 2>stderr at_status=$? $at_traceoff -at_continue=: +at_failed=false dnl Check stderr. m4_case([$4], ignore, [cat stderr >&5], experr, [AT_CLEANUP_FILE([experr])dnl -$at_diff experr stderr >&5 || at_continue='exit 1'], - [], [$at_diff empty stderr >&5 || at_continue='exit 1'], - [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_continue='exit 1']) +$at_diff experr stderr >&5 || at_failed=:], + [], [$at_diff empty stderr >&5 || at_failed=:], + [echo $at_n "m4_patsubst([$4], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stderr >&5 || at_failed=:]) dnl Check stdout. m4_case([$3], ignore, [cat stdout >&5], expout, [AT_CLEANUP_FILES([expout])dnl -$at_diff expout stdout >&5 || at_continue='exit 1'], - [], [$at_diff empty stdout >&5 || at_continue='exit 1'], - [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1']) +$at_diff expout stdout >&5 || at_failed=:], + [], [$at_diff empty stdout >&5 || at_failed=:], + [echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_failed=:]) dnl Check exit val. case $at_status in 77) exit 77;; @@ -456,8 +456,9 @@ m4_case([$2], [ *);;], [ m4_default([$2], [0])) ;; *) $at_verbose "Exit code was $at_status, expected $2" >&2 - at_continue='exit 1';;]) + at_failed=:;;]) esac -$at_continue +AS_IFELSE($at_failed, [$5], [$6]) +$at_failed && exit 1 $at_traceon ])# AT_CHECK diff --git a/tests/atspecific.m4 b/tests/atspecific.m4 index b4b49c67d..22f04d437 100644 --- a/tests/atspecific.m4 +++ b/tests/atspecific.m4 @@ -44,8 +44,8 @@ m4_define([AT_CHECK_CONFIGURE], [AT_CLEANUP_FILE_IFELSE([config.hin], [AT_CLEANUP_FILE(config.h)])dnl AT_CLEANUP_FILES(config.log config.status config.cache)dnl -AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, []) -test $at_verbose = echo && echo "--- config.log" && cat config.log]) +AT_CHECK([top_srcdir=$top_srcdir ./configure], 0, ignore, [], + [test $at_verbose = echo && echo "--- config.log" && cat config.log])]) # _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS)