From: Akim Demaille Date: Thu, 13 Sep 2001 06:57:01 +0000 (+0000) Subject: * lib/autotest/general.m4 (AT_INIT): Create and remove X-Git-Tag: AUTOCONF-2.52f~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b13885b690f7eed41db2832727e540c8481dd7ce;p=thirdparty%2Fautoconf.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 8e0ec5441..58b20d3bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-09-13 Akim Demaille + + * 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 * tests/mktests.sh: Don't output banners for empty test files. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 267a8fcb0..4e3ae8ea6 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -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. diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 18af9d79a..c2b4d0249 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -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