autoconf-patches
[Top][All Lists]
Advanced

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

Re: Avoid long lines in testsuite script.


From: Eric Blake
Subject: Re: Avoid long lines in testsuite script.
Date: Fri, 27 Aug 2010 11:55:39 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 08/07/2010 02:46 AM, Ralf Wildenhues wrote:

Hi Ralf, and sorry for the delayed review,

Even if the shell and its internal echo may not have any issues with
long lines and command-line arguments, given enough test groups, some
seds and (h)awks will still eventually barf (when used to extract tests)
and editing testsuite manually won't work with some vendor vi.

So, time to have newline-separated $at_groups_all and $at_groups.

Long lines may still be an issue if the user writes a problematic test, but I agree that autotest itself shouldn't be causing long lines if the user is careful.

     Avoid long lines in testsuite script.

     * lib/autotest/general.m4 (AT_INIT): Remove definition of
     AT_groups_all.  Initialize at_groups from at_help_all, with
     newlines instead of spaces separating test groups numbers.
     Adjust all code to newlines.
     * NEWS: Update.
     * tests/autotest.at (Huge testsuite): New test.

diff --git a/NEWS b/NEWS
index d7c74df..b017a43 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ GNU Autoconf NEWS - User visible changes.
  ** AT_BANNER() with empty argument will cause visual separation from previous
     test category.

+** Autotest testsuites should not contain long text lines any more, and be
+   portable even when very many test groups are used.

We still have a hard-coded limit at 9999, but now we are more likely to be able to actually get to that point without other long line issues getting in the way first.

-# List of the all the test groups.
-at_groups_all='AT_groups_all'
  # As many question marks as there are digits in the last test group number.
  # Used to normalize the test group numbers so that `ls' lists them in
  # numerical order.
  at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [?])'
  # Description of all the test groups.
  at_help_all="AS_ESCAPE(m4_dquote(m4_defn([AT_help_all])))"
+# List of the all the test groups.
+at_groups_all=`AS_ECHO(["$at_help_all"]) | sed 's/;.*//'`

Well, that adds a couple more processes to testsuite startup time, but I'm not seeing a quick escape-hatch for avoiding that without invalidating the rest of your patch.

ACK; please apply.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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