]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4 (AT_INIT): Create and remove
authorAkim Demaille <akim@epita.fr>
Thu, 13 Sep 2001 06:57:01 +0000 (06:57 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 13 Sep 2001 06:57:01 +0000 (06:57 +0000)
`$as_me.[0-9]+' instead of `debug-[0-9]+.sh', so that multiple
test suites can cohabit.

ChangeLog
lib/autotest/general.m4
lib/m4sugar/m4sh.m4

index 8e0ec54418c45ec21004914732a2144d82166a91..58b20d3bfa5b35aadd977e6014a352cdfcb42dbd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-13  Akim Demaille  <akim@epita.fr>
+
+       * lib/autotest/general.m4 (AT_INIT): Create and remove
+       `$as_me.[0-9]+' instead of `debug-[0-9]+.sh', so that multiple
+       test suites can cohabit.
+
 2001-09-13  Akim Demaille  <akim@epita.fr>
 
        * tests/mktests.sh: Don't output banners for empty test files.
index 267a8fcb0eab403c4209eb694ac1fb6c329178ec..4e3ae8ea6537c4040385598913bb2e96e876e3ce 100644 (file)
@@ -141,8 +141,12 @@ m4_divert([OPTIONS])
 
 while test $[@%:@] -gt 0; do
   case $[1] in
-    --help | -h) at_help=short ;;
-    --full-help | -H ) at_help=long;;
+    --help | -h) at_help=short
+        ;;
+
+    --full-help | -H ) at_help=long
+        ;;
+
     --version)
         if test -n "$at_package_string"; then
           echo "$as_me ($at_package_string)"
@@ -155,8 +159,10 @@ while test $[@%:@] -gt 0; do
         ;;
 
     --clean | -c )
-        rm -rf $at_data_files debug-*.sh $as_me.log devnull
-       exit 0
+        rm -rf $at_data_files \
+               $as_me.[0-9] $as_me.[0-9][0-9] $as_me.[0-9][0-9][0-9] \
+               $as_me.log devnull
+        exit 0
         ;;
 
     -d) at_debug=:
@@ -528,17 +534,22 @@ elif test $at_debug = false; then
   fi
 
   # Remove any debugging script resulting from a previous run.
-  rm -f debug-*.sh
+  rm -f $as_me.[0-9] $as_me.[0-9][0-9] $as_me.[0-9][0-9][0-9]
+
   echo
-  echo $ECHO_N "Writing \`debug-NN.sh' scripts, with NN =$ECHO_C"
-  for at_group in $at_fail_list; do
-    echo $ECHO_N " $at_group$ECHO_C"
+  echo $ECHO_N "Writing \`$as_me.NN' scripts, with NN =$ECHO_C"
+  for at_group in $at_fail_list
+  do
+    # Normalize the names so that `ls' lists them in order.
+    at_format=`echo $at_last_test | sed 's/././g'`
+    at_number=`expr "000$at_group" : ".*\($at_format\)"`
+    echo $ECHO_N " $at_number$ECHO_C"
     ( echo "#! /bin/sh"
       echo 'exec ${CONFIG_SHELL-'"$SHELL"'}' "$[0]" \
            '-v -d' "$at_debug_args" "$at_group" '${1+"$[@]"}'
       echo 'exit 1'
-    ) >debug-$at_group.sh
-    chmod +x debug-$at_group.sh
+    ) >$as_me.$at_number
+    chmod +x $as_me.$at_number
   done
   echo ', done'
   echo
@@ -584,6 +595,8 @@ m4_divert_pop([TAIL])dnl
 m4_wrap([m4_divert_text([DEFAULT],
                         [# List of the tests.
 at_tests_all="AT_TESTS_ALL "
+# Number of the last test.
+at_last_test=AT_ordinal
 # Description of all the tests.
 at_help_all="AT_help"
 # List of the output files.
index 18af9d79af4c810a001afb959be3ed57761cb390..c2b4d02496751d9369f7aeafb037e36ccfeb5ced 100644 (file)
@@ -110,7 +110,6 @@ elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
 fi
 
 # Name of the executable.
-dnl Moved here because the tests below can use AC_MSG_ERROR, which uses $as_me
 as_me=`AS_BASENAME($[0])`
 
 _AS_ECHO_N_PREPARE