[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 15autotest-more-info-prettier.diff
From: |
Derek Robert Price |
Subject: |
Re: 15autotest-more-info-prettier.diff |
Date: |
Thu, 14 Aug 2003 00:44:36 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 |
Paul Eggert wrote:
I like the idea of more-informative messages, but I don't like the
idea of splitting them into two lines depending on this-and-that.
That makes it more of a pain to grep for failures.
How long are the typical components of the more-informative lines?
I've been basing the test names in the CVS test suite on the names of
the sanity.sh tests I am converting, so they are unlikely to go over
twenty or so characters. The Autoconf test suite, however, sometimes
approaches the end of the 50 character column width I set in the 15 patch.
Can we rearrange the column budget so that it will typically fit in 80
columns? It seems like it has a lot of white space, and repeated file
names and unnecessary line numbers.
How about a format that looks like this instead?
Initialize a repository
1: init (init.at:16) ok
2: init-l (init.at:16) ok
3: init-r (init.at:16) ok
4: init-r-l (init.at:16) ok
CVS Version Strings
5: version (version.at:57) FAILED
6: version-l (version.at:57) FAILED
7: version-r (version.at:50) FAILED
8: version-r-l (version.at:50) FAILED
The basic idea here is to give just one line number (either that of
the success, or of the failure),
The success line numbers you list are the calls to AT_SETUP, the first
line of a test group, and the failure line numbers are calls to AT_CHECK
within a test group. The meaning is somewhat different, at least the
way it was being used previously. I believe the first <file>:<line> was
originally meant to be a test designation. The second was listed with
"near <file>:<line>" to help the reader locate the failure. I think
that the double meaning in the same location is slightly confusing. Is
this what you meant to do?
What about removing the first <file>:<line>, except in the case of
failure. That information can be recovered from the test log anyhow, if
desired. e.g.:
Initialize a repository
1: init ok
2: init-l ok
3: init-r ok
4: init-r-l ok
CVS Version Strings
5: version FAILED (version.at:57)
6: version-l FAILED (version.at:57)
7: version-r FAILED (version.at:50)
8: version-r-l FAILED (version.at:50)
Where the DESCRIPTION column would be given approx. 50 characters. I've
run the Autoconf test suite and none of the description columns appear
to exceed that width.
and to cut down the number of aligned
columns to 3. Also, to emphasize the test name, not its location.
I've attached the patch. It replaces 13 & 15. Here's some sample
output from the Autoconf test suite:
Executables (autoheader, autoupdate...).
1: Syntax of the shell scripts ok
2: Syntax of the Perl scripts ok
3: autom4te cache ok
4: autoconf --trace: user macros ok
5: autoconf --trace: builtins ok
...
There should be plenty of room for the status messages.
Index: ChangeLog
2003-08-14 Derek Price <address@hidden>
* lib/autotestgeneral.m4 (AT_INIT): Reformat test summary line to print
DESCRIPTION rather than FILE and LINE. Shorten result to fit in new,
shorter column three. Add DESCRIPTION to log file content.
Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.150
diff -u -r1.150 general.m4
--- lib/autotest/general.m4 13 Aug 2003 21:35:28 -0000 1.150
+++ lib/autotest/general.m4 14 Aug 2003 04:36:14 -0000
@@ -652,23 +652,23 @@
at_errexit=false
;;
*:77)
- at_msg="ok (skipped near \``cat $at_check_line_file`')"
+ at_msg="skipped (`cat $at_check_line_file`)"
at_skip_list="$at_skip_list $at_group"
at_errexit=false
;;
yes:*)
- at_msg="expected failure (failed near \``cat $at_check_line_file`')"
+ at_msg="expected failure (`cat $at_check_line_file`)"
at_xfail_list="$at_xfail_list $at_group"
at_errexit=false
;;
no:*)
- at_msg="FAILED near \``cat $at_check_line_file`'"
+ at_msg="FAILED (`cat $at_check_line_file`)"
at_fail_list="$at_fail_list $at_group"
at_errexit=$at_errexit_p
;;
esac
echo $at_msg
- at_log_msg="$at_group. $at_setup_line: $at_msg"
+ 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
@@ -913,8 +913,9 @@
m4_divert_push([TESTS])dnl
AT_ordinal ) @%:@ AT_ordinal. m4_defn([AT_line]): $1
at_setup_line='m4_defn([AT_line])'
- $at_quiet $ECHO_N "m4_format([[%3d: %-18s]],
- AT_ordinal, m4_defn([AT_line]))[]$ECHO_C"
+ at_desc='$1'
+ $at_quiet $ECHO_N "m4_format([[%3d: %-45s]],
+ AT_ordinal, [$1])[]$ECHO_C"
m4_divert_push([TEST_SCRIPT])dnl
])
Derek
--
*8^)
Email: address@hidden
Get CVS support at <http://ximbiot.com>!
--
82. Hold a hard drive to your ear -- listen to the C.
- 15autotest-more-info-prettier.diff, derek, 2003/08/13
- Re: 15autotest-more-info-prettier.diff, Paul Eggert, 2003/08/13
- Re: 15autotest-more-info-prettier.diff,
Derek Robert Price <=
- Re: 15autotest-more-info-prettier.diff, gary, 2003/08/14
- Re: 15autotest-more-info-prettier.diff, Akim Demaille, 2003/08/14
- Re: 15autotest-more-info-prettier.diff, gary, 2003/08/15
- Re: 15autotest-more-info-prettier.diff, Paul Eggert, 2003/08/15
- Re: 15autotest-more-info-prettier.diff, Akim Demaille, 2003/08/18
- Re: 15autotest-more-info-prettier.diff, Akim Demaille, 2003/08/18