autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

13more-autotest-info.diff


From: derek
Subject: 13more-autotest-info.diff
Date: 13 Aug 2003 21:05:06 -0000

I was hoping to commit this simple patch to verbosify the autotest script
output by printing the description of tests as well at the file and line.  This
is important to me in CVS, where I have a wrapper that sets up multiple
variants of a test by calling AT_SETUP multiple times with slightly different
descriptions based on a single AT_CVS_SETUP call.  It's the difference between
this output:

## ----------------------------------------------------- ##
## Concurrent Versions System (CVS) 1.12.1.1 test suite. ##
## ----------------------------------------------------- ##

Initialize a repository

  1: init.at:16        ok
  2: init.at:16        ok
  3: init.at:16        ok
  4: init.at:16        ok

CVS Version Strings

  5: version.at:16     ok
  6: version.at:16     ok
  7: version.at:16     ok
  8: version.at:16     ok
...


...and this output:

## ----------------------------------------------------- ##
## Concurrent Versions System (CVS) 1.12.1.1 test suite. ##
## ----------------------------------------------------- ##

Initialize a repository

  1: init.at:16        : init                                                ok
  2: init.at:16        : init-l                                              ok
  3: init.at:16        : init-r                                              ok
  4: init.at:16        : init-r-l                                            ok

CVS Version Strings

  5: version.at:16     : version                                             ok
  6: version.at:16     : version-l                                           ok
  7: version.at:16     : version-r                                           ok
  8: version.at:16     : version-r-l                                         ok
...


Hopefully you can see how much nicer that looks.  This patch makes the Autoconf
test suite produce output like this:

## ------------------------------ ##
## GNU Autoconf 2.57b test suite. ##
## ------------------------------ ##

Executables (autoheader, autoupdate...).

  1: tools.at:47       : Syntax of the shell scripts                         ok
  2: tools.at:92       : Syntax of the Perl scripts                          ok
  3: tools.at:118      : autom4te cache                                      ok
  4: tools.at:155      : autoconf --trace: user macros                       ok
  5: tools.at:242      : autoconf --trace: builtins                          ok
  6: tools.at:273      : autoconf: forbidden tokens, basic                   ok
  7: tools.at:301      : autoconf: forbidden tokens, exceptions              ok
  8: tools.at:347      : ifnames                                             ok
...

...which I also think looks nicer.  Comments?

Index: ChangeLog

2003-08-13  Derek Price  <address@hidden>

        * lib/autotest/general.m4 (AT_SETUP): Output the description of the
        test while it is running.

Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.149
diff -u -r1.149 general.m4
--- lib/autotest/general.m4     12 Aug 2003 19:01:35 -0000      1.149
+++ lib/autotest/general.m4     13 Aug 2003 20:47:11 -0000
@@ -913,8 +913,8 @@
 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_quiet $ECHO_N "m4_format([[%3d: %-18s: %-51s ]],
+                      AT_ordinal, m4_defn([AT_line]), [$1])[]$ECHO_C"
 m4_divert_push([TEST_SCRIPT])dnl
 ])
 

Derek




reply via email to

[Prev in Thread] Current Thread [Next in Thread]