]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/atgeneral.m4 (AT_CLEANUP): Factor the computation of
authorAkim Demaille <akim@epita.fr>
Thu, 23 Nov 2000 09:52:58 +0000 (09:52 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 23 Nov 2000 09:52:58 +0000 (09:52 +0000)
at_test_count into...
(AT_INIT): here.
Use an sh variable, at_data_files, instead of an hard coded list.

ChangeLog
lib/autotest/general.m4
tests/atgeneral.m4

index b3d679b58c986cccc7c142f936160eeacb0e5357..7a940d354e6833d9d59268f345c00ad63ca1c508 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-23  Akim Demaille  <akim@epita.fr>
+
+       * 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  <akim@epita.fr>
 
        * tests/atgeneral.m4 (AT_CLEAN_FILE_IFELSE, AT_CLEANUP_FILE)
index ce6e48d2160cbc2cf8570dc7c94a28a581b4c7b5..34eb4a33036e9658ae1fac44eb689d1739a4e678 100644 (file)
@@ -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
index ce6e48d2160cbc2cf8570dc7c94a28a581b4c7b5..34eb4a33036e9658ae1fac44eb689d1739a4e678 100644 (file)
@@ -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