From: Akim Demaille Date: Fri, 26 Sep 2003 08:12:38 +0000 (+0000) Subject: The test suite are sometimes assigning timings incorrectly. X-Git-Tag: AUTOCONF-2.57e~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f58280e8ccb8b4d46a4186b5656e3934c16c16dc;p=thirdparty%2Fautoconf.git The test suite are sometimes assigning timings incorrectly. Reported by Paivio Pollari. Diagnosed by Nicolas Joly. * lib/autotest/general.m4 (AT_CLEANUP): Rename AT_help as AT_help_all. Instead of making AT_help a sequence of assignments to grow $at_help_all, just make AT_help_all be the growing contents of $at_help_all, and make a single assignment in... (AT_INIT): here. (at_times_skip): Flip the meaning and rename as... (at_times_p): this. (AT_INIT): When summarizing the test that ran, remove $at_times_file after use, and check it is present before trying to use it. --- diff --git a/ChangeLog b/ChangeLog index 277386fe..ecda3261 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2003-09-26 Akim Demaille + + The test suite are sometimes assigning timings incorrectly. + Reported by Paivio Pollari. + Diagnosed by Nicolas Joly. + + * lib/autotest/general.m4 (AT_CLEANUP): Rename AT_help as + AT_help_all. + Instead of making AT_help a sequence of assignments to grow + $at_help_all, just make AT_help_all be the growing contents of + $at_help_all, and make a single assignment in... + (AT_INIT): here. + (at_times_skip): Flip the meaning and rename as... + (at_times_p): this. + (AT_INIT): When summarizing the test that ran, remove + $at_times_file after use, and check it is present before trying to + use it. + 2003-09-25 Akim Demaille Version 2.57d. diff --git a/THANKS b/THANKS index e70f22dc..d7ff3d06 100644 --- a/THANKS +++ b/THANKS @@ -145,6 +145,7 @@ Noah Friedman friedman@gnu.ai.mit.edu Oliver Kiddle opk@zsh.org Olly Betts olly@survex.com Ossama Othman ossama@debian.org +Paivio Pollari pollari@sun3.oulu.fi Patrick Tullmann tullmann@cs.utah.edu Patrick Welche prlw1@newn.cam.ac.uk Paul Berrevoets paul@swi.com diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 8397e555..f73ad9bd 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -171,8 +171,8 @@ fi # Not all shells have the 'times' builtin; the subshell is needed to make # sure we discard the 'times: not found' message from the shell. -at_times_skip=: -(times) >/dev/null 2>&1 && at_times_skip=false +at_times_p=false +(times) >/dev/null 2>&1 && at_times_p=: # CLI Arguments to pass to the debugging scripts. at_debug_args= @@ -221,8 +221,7 @@ at_groups_all='AT_groups_all' # numerical order. at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [.])' # Description of all the test groups. -at_help_all= -AT_help])])dnl +at_help_all='AT_help_all'])])dnl m4_divert_push([PARSE_ARGS])dnl at_keywords= @@ -681,13 +680,14 @@ _ATEOF at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg" case $at_status in 0|77) - # $at_times_file is only available if the group succeeded or - # was skipped. We're not including the group log, so the - # success message is written in the global log separately. - # But we also write to the group log in case they're using - # -d. - $at_times_skip || + # $at_times_file is only available if the group succeeded. + # We're not including the group log, so the success message + # is written in the global log separately. But we also + # write to the group log in case they're using -d. + if test -f $at_times_file; then at_log_msg="$at_log_msg (`sed 1d $at_times_file`)" + rm -f $at_times_file + fi echo "$at_log_msg" >> $at_group_log echo "$at_log_msg" >&AS_MESSAGE_LOG_FD @@ -821,7 +821,7 @@ case $at_skip_count in *) at_result="$at_result $at_skip_count tests were skipped." ;; esac - + if test $at_unexpected_count = 0; then echo "$at_result" echo "$at_result" >&AS_MESSAGE_LOG_FD @@ -992,7 +992,7 @@ AS_IF([$at_arg_given_[]m4_bpatsubst([AT_first_option], -, _)],,[$5])dnl # $at_arg_OPTION will be set to `:' if this option is received, `false' if # if --noOPTION is received, and `false' by default. # -# Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered with +# Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered with # $at_optarg set to `:' or `false' as appropriate. $opt_arg is actually # just a copy of $at_arg_OPTION. # @@ -1013,7 +1013,7 @@ m4_defun([AT_ARG_OPTION],[_AT_ARG_OPTION([$1],[$2],,[$3],[$4])]) # variable $at_arg_OPTION, where OPTION is the first option in OPTIONS with # any `-' characters replaced with `_'. # -# Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered with +# Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered with # $at_optarg set. $at_optarg is actually just a copy of $at_arg_OPTION. # # ACTION-IF-NOT-GIVEN will be run once after option parsing is complete @@ -1059,7 +1059,7 @@ m4_divert_push([TEST_SCRIPT])dnl m4_define([AT_XFAIL_IF], [dnl dnl Try to limit the amount of conditionals that we emit. -m4_case([$1], +m4_case([$1], [], [], [false], [], [:], [m4_define([AT_xfail], [at_xfail=yes])], @@ -1079,9 +1079,8 @@ m4_define([AT_KEYWORDS], # ---------- # Complete a group of related tests. m4_define([AT_CLEANUP], -[m4_append([AT_help], -at_help_all=$at_help_all'm4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);m4_ifdef([AT_keywords], [m4_defn([AT_keywords])]); -' +[m4_append([AT_help_all], +m4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);m4_ifdef([AT_keywords], [m4_defn([AT_keywords])]); )dnl m4_divert_pop([TEST_SCRIPT])dnl Back to TESTS AT_xfail @@ -1090,7 +1089,7 @@ m4_divert_pop([TEST_SCRIPT])dnl Back to TESTS $at_traceon m4_undivert([TEST_SCRIPT])dnl Insert the code here $at_traceoff - $at_times_skip || times >$at_times_file + $at_times_p && times >$at_times_file ) AS_MESSAGE_LOG_FD>&1 2>&1 | eval $at_tee_pipe at_status=`cat $at_status_file` ;;