From: Akim Demaille Date: Thu, 23 Nov 2000 09:51:33 +0000 (+0000) Subject: Factor part of the prologue of the tests. X-Git-Tag: autoconf-2.50~399 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e490f231b9f81e6a6a4f380cd8addae40d0f69c7;p=thirdparty%2Fautoconf.git Factor part of the prologue of the tests. * tests/atgeneral.m4 (AT_SETUP, AT_CLEANUP): No longer handle at_stop_on_error. (AT_INIT): After having checked whether the test failed, break out of the loop if requested (-e). --- diff --git a/ChangeLog b/ChangeLog index f3e28e91e..b39a88b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-11-23 Akim Demaille + + Factor part of the prologue of the tests. + + * tests/atgeneral.m4 (AT_SETUP, AT_CLEANUP): No longer handle + at_stop_on_error. + (AT_INIT): After having checked whether the test failed, break out + of the loop if requested (-e). + + 2000-11-23 Akim Demaille * tests/atgeneral.m4 (AT_SETUP): Don't build at-check-line, that's diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index d9f918c06..dad7c3e93 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -174,6 +174,9 @@ m4_divert_push(3)[]dnl at_failed_list="$at_failed_list $test" ;; esac + if $at_stop_on_error && test -n "$at_failed_list"; then + break + fi done # Wrap up the testing suite with summary statistics. @@ -258,21 +261,20 @@ m4_pushdef([AT_data_expout], ) m4_pushdef([AT_data_experr], ) m4_divert_pop()dnl AT_ordinal ) - if $at_stop_on_error && test -n "$at_failed_list"; then :; else dnl Here will be inserted the `rm' corresponding to AT_CLEANUP. m4_divert(2)[]dnl - echo AT_LINE > at-setup-line - if $at_verbose; then - echo 'testing $1' - echo $at_n " $at_c" - fi - if $at_verbose; then - echo "AT_ordinal. $srcdir/AT_LINE..." - else - echo $at_n "m4_substr(AT_ordinal. $srcdir/AT_LINE , 0, 30)[]$at_c" - fi - ( -$at_traceon + echo AT_LINE > at-setup-line + if $at_verbose; then + echo 'testing $1' + echo $at_n " $at_c" + fi + if $at_verbose; then + echo "AT_ordinal. $srcdir/AT_LINE..." + else + echo $at_n "m4_substr(AT_ordinal. $srcdir/AT_LINE , 0, 30)[]$at_c" + fi + ( + $at_traceon ]) @@ -282,17 +284,16 @@ $at_traceon # created within the test. There is no need to list stdout, stderr, # nor files created with AT_DATA. 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 +[ $at_traceoff + ) + at_status=$? + at_test_count=`expr 1 + $at_test_count` + if $at_stop_on_error && test -n "$at_failed_list"; then :; else m4_divert(1)[]dnl rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr m4_undivert(2)[]dnl - rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr - fi + rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr fi ;; diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4 index d9f918c06..dad7c3e93 100644 --- a/tests/atgeneral.m4 +++ b/tests/atgeneral.m4 @@ -174,6 +174,9 @@ m4_divert_push(3)[]dnl at_failed_list="$at_failed_list $test" ;; esac + if $at_stop_on_error && test -n "$at_failed_list"; then + break + fi done # Wrap up the testing suite with summary statistics. @@ -258,21 +261,20 @@ m4_pushdef([AT_data_expout], ) m4_pushdef([AT_data_experr], ) m4_divert_pop()dnl AT_ordinal ) - if $at_stop_on_error && test -n "$at_failed_list"; then :; else dnl Here will be inserted the `rm' corresponding to AT_CLEANUP. m4_divert(2)[]dnl - echo AT_LINE > at-setup-line - if $at_verbose; then - echo 'testing $1' - echo $at_n " $at_c" - fi - if $at_verbose; then - echo "AT_ordinal. $srcdir/AT_LINE..." - else - echo $at_n "m4_substr(AT_ordinal. $srcdir/AT_LINE , 0, 30)[]$at_c" - fi - ( -$at_traceon + echo AT_LINE > at-setup-line + if $at_verbose; then + echo 'testing $1' + echo $at_n " $at_c" + fi + if $at_verbose; then + echo "AT_ordinal. $srcdir/AT_LINE..." + else + echo $at_n "m4_substr(AT_ordinal. $srcdir/AT_LINE , 0, 30)[]$at_c" + fi + ( + $at_traceon ]) @@ -282,17 +284,16 @@ $at_traceon # created within the test. There is no need to list stdout, stderr, # nor files created with AT_DATA. 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 +[ $at_traceoff + ) + at_status=$? + at_test_count=`expr 1 + $at_test_count` + if $at_stop_on_error && test -n "$at_failed_list"; then :; else m4_divert(1)[]dnl rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr m4_undivert(2)[]dnl - rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr - fi + rm ifelse([AT_data_files$1], , [-f], [-rf[]AT_data_files[]ifelse($1, , , [ $1])]) stdout stderr[]AT_data_expout[]AT_data_experr fi ;;