From: Akim Demaille Date: Thu, 23 Nov 2000 09:52:58 +0000 (+0000) Subject: * tests/atgeneral.m4 (AT_CLEANUP): Factor the computation of X-Git-Tag: autoconf-2.50~396 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a7e444ed71bf989a732e66b6b531364dfd16ddc;p=thirdparty%2Fautoconf.git * tests/atgeneral.m4 (AT_CLEANUP): Factor the computation of at_test_count into... (AT_INIT): here. Use an sh variable, at_data_files, instead of an hard coded list. --- diff --git a/ChangeLog b/ChangeLog index b3d679b58..7a940d354 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-11-23 Akim Demaille + + * tests/atgeneral.m4 (AT_CLEANUP): Factor the computation of + at_test_count into... + (AT_INIT): here. + Use an sh variable, at_data_files, instead of an hard coded list. + 2000-11-23 Akim Demaille * tests/atgeneral.m4 (AT_CLEAN_FILE_IFELSE, AT_CLEANUP_FILE) diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index ce6e48d21..34eb4a330 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -158,6 +158,7 @@ do m4_divert_pop[]dnl m4_divert_push(3)[]dnl esac + at_test_count=`expr 1 + $at_test_count` $at_verbose $at_n " $test. $srcdir/`cat at-setup-line`: $at_c" case $at_status in 0) echo ok @@ -167,11 +168,10 @@ m4_divert_push(3)[]dnl ;; *) echo "FAILED near \``cat at-check-line`'" at_failed_list="$at_failed_list $test" + $at_stop_on_error && break ;; esac - if $at_stop_on_error && test -n "$at_failed_list"; then - break - fi + $at_debug || rm -rf $at_data_files done # Wrap up the testing suite with summary statistics. @@ -251,8 +251,9 @@ AT_DEFINE([AT_SETUP], m4_pushdef([AT_data_files], [stdout stderr ]) m4_divert_pop()dnl AT_ordinal ) -dnl Here will be inserted the `rm' corresponding to AT_CLEANUP. +dnl Here will be inserted the definition of at_data_files. m4_divert(2)[]dnl + rm -rf $at_data_files echo AT_LINE > at-setup-line $at_verbose 'testing $1' $at_verbose $at_n " $at_c" @@ -300,13 +301,9 @@ AT_DEFINE([AT_CLEANUP], $at_traceoff ) at_status=$? - at_test_count=`expr 1 + $at_test_count` - if $at_stop_on_error && test -n "$at_failed_list"; then :; else - rm -rf AT_data_files - fi ;; m4_divert(1)[]dnl - rm -rf AT_data_files + at_data_files="AT_data_files" m4_undivert(2)[]dnl m4_popdef([AT_data_files])dnl m4_divert_push([KILL])dnl diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4 index ce6e48d21..34eb4a330 100644 --- a/tests/atgeneral.m4 +++ b/tests/atgeneral.m4 @@ -158,6 +158,7 @@ do m4_divert_pop[]dnl m4_divert_push(3)[]dnl esac + at_test_count=`expr 1 + $at_test_count` $at_verbose $at_n " $test. $srcdir/`cat at-setup-line`: $at_c" case $at_status in 0) echo ok @@ -167,11 +168,10 @@ m4_divert_push(3)[]dnl ;; *) echo "FAILED near \``cat at-check-line`'" at_failed_list="$at_failed_list $test" + $at_stop_on_error && break ;; esac - if $at_stop_on_error && test -n "$at_failed_list"; then - break - fi + $at_debug || rm -rf $at_data_files done # Wrap up the testing suite with summary statistics. @@ -251,8 +251,9 @@ AT_DEFINE([AT_SETUP], m4_pushdef([AT_data_files], [stdout stderr ]) m4_divert_pop()dnl AT_ordinal ) -dnl Here will be inserted the `rm' corresponding to AT_CLEANUP. +dnl Here will be inserted the definition of at_data_files. m4_divert(2)[]dnl + rm -rf $at_data_files echo AT_LINE > at-setup-line $at_verbose 'testing $1' $at_verbose $at_n " $at_c" @@ -300,13 +301,9 @@ AT_DEFINE([AT_CLEANUP], $at_traceoff ) at_status=$? - at_test_count=`expr 1 + $at_test_count` - if $at_stop_on_error && test -n "$at_failed_list"; then :; else - rm -rf AT_data_files - fi ;; m4_divert(1)[]dnl - rm -rf AT_data_files + at_data_files="AT_data_files" m4_undivert(2)[]dnl m4_popdef([AT_data_files])dnl m4_divert_push([KILL])dnl