diff --git a/ChangeLog b/ChangeLog index 5763df5c..9ea24f58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-11-23 Akim Demaille + + Factor the epilogue of the tests. + + * tests/atgeneral.m4 (AT_CLEANUP): Move the reading of at_status + into... + (AT_INIT): here, at the end of the `case'. + 2000-11-23 Akim Demaille The debug scripts are only wrapper around testsuite, asking for a diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 425a0477..f4186a07 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -162,10 +162,23 @@ m4_divert_push(1)dnl : ${tests="$TESTS"} for test in $tests do + at_status=0; case $test in m4_divert_pop[]dnl m4_divert_push(3)[]dnl esac + $at_verbose && + echo $at_n " AT_ordinal. $srcdir/`cat at-setup-line`: $at_c" + case $at_status in + 0) echo ok + ;; + 77) echo "ignored near \``cat at-check-line`'" + at_ignore_count=`expr $at_ignore_count + 1` + ;; + *) echo "FAILED near \``cat at-check-line`'" + at_failed_list="$at_failed_list $test" + ;; + esac done # Wrap up the testing suite with summary statistics. @@ -284,21 +297,9 @@ $at_traceoff [[#] Snippet )s[]AT_ordinal[]) ) at_status=$? - $at_verbose && - echo $at_n " AT_ordinal. $srcdir/`cat at-setup-line`: $at_c" - case $at_status in - 0) echo ok - ;; - 77) echo "ignored near \``cat at-check-line`'" - at_ignore_count=`expr $at_ignore_count + 1` - ;; - *) echo "FAILED near \``cat at-check-line`'" - at_failed_list="$at_failed_list AT_ordinal" - ;; - esac else - echo 'ignored (skipped)' - at_ignore_count=`expr $at_ignore_count + 1` + echo 'ignored (skipped)' + at_ignore_count=`expr $at_ignore_count + 1` fi at_test_count=`expr 1 + $at_test_count` if $at_stop_on_error && test -n "$at_failed_list"; then :; else diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4 index 425a0477..f4186a07 100644 --- a/tests/atgeneral.m4 +++ b/tests/atgeneral.m4 @@ -162,10 +162,23 @@ m4_divert_push(1)dnl : ${tests="$TESTS"} for test in $tests do + at_status=0; case $test in m4_divert_pop[]dnl m4_divert_push(3)[]dnl esac + $at_verbose && + echo $at_n " AT_ordinal. $srcdir/`cat at-setup-line`: $at_c" + case $at_status in + 0) echo ok + ;; + 77) echo "ignored near \``cat at-check-line`'" + at_ignore_count=`expr $at_ignore_count + 1` + ;; + *) echo "FAILED near \``cat at-check-line`'" + at_failed_list="$at_failed_list $test" + ;; + esac done # Wrap up the testing suite with summary statistics. @@ -284,21 +297,9 @@ $at_traceoff [[#] Snippet )s[]AT_ordinal[]) ) at_status=$? - $at_verbose && - echo $at_n " AT_ordinal. $srcdir/`cat at-setup-line`: $at_c" - case $at_status in - 0) echo ok - ;; - 77) echo "ignored near \``cat at-check-line`'" - at_ignore_count=`expr $at_ignore_count + 1` - ;; - *) echo "FAILED near \``cat at-check-line`'" - at_failed_list="$at_failed_list AT_ordinal" - ;; - esac else - echo 'ignored (skipped)' - at_ignore_count=`expr $at_ignore_count + 1` + echo 'ignored (skipped)' + at_ignore_count=`expr $at_ignore_count + 1` fi at_test_count=`expr 1 + $at_test_count` if $at_stop_on_error && test -n "$at_failed_list"; then :; else