autoconf-patches
[Top][All Lists]
Advanced

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

Re: AT_BANNER handling


From: Eric Blake
Subject: Re: AT_BANNER handling
Date: Fri, 19 Oct 2007 22:00:20 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 10/19/2007 11:17 AM:
> Hello Eric,
> 
> Your patch breaks
>   ./testsuite -10 --list

I'll look into it; probably something in $at_groups_all changed how the
awk script at the comment 'Passing at_groups is tricky.' reacts.  Oh - it
must be because before my patch, the earlier awk script that parsed out
banner numbers reformatted the list back into space-separated, not newline
separated.

> and exits with 1, so there is room for improvement here.  I'm thinking
> of something like the following.  AFAICS it requires another place for
> shell functions.  The testsuite additions also expose the breakage above
> (see the last two tests).

Indeed, yours is the first shell function that is necessary during
argument parsing (hence you are right that it belongs in the DEFAULTS
diversion, not PREPARE_TESTS).

> 
> OK?  Feel free to split off the last two tests to the commit that fixes
> them.  ;-)

I don't see any problem with you committing the entire patch; it's up to
you if you want to add a temp XFAIL for those two failures, to remind us
to fix the problem.

> 2007-10-19  Ralf Wildenhues  <address@hidden>
> 
>       * lib/autotest/general.m4 (Defaults): Validate input ranges ...
>       <at_func_validate_ranges>: ... using this new function.
>       * tests/autotest.at (Keywords and ranges): Test invalid ranges.
>       Test --list with ranges and keywords.

>  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])))"])])dnl
> +at_help_all="AS_ESCAPE(m4_dquote(m4_defn([AT_help_all])))"
> +
> +# at_func_validate_ranges [N...]
> +# ------------------------------
> +# validate test group ranges
> +at_func_validate_ranges ()

Does this entire shell function have to live in the m4_wrap, or should we
use the m4_wrap to capture the final value of AT_ordinal into a shell
variable, and then the function can just reference the shell variable?  I
don't have a strong opinion either way, so I guess just leave your patch
the way it is.

>      # Ranges
>      [[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-])
>       at_range_start=`echo $at_option |tr -d X-`
> +     at_func_validate_ranges $at_range_start
>       at_range=`AS_ECHO([" $at_groups_all "]) | \
>         sed -e 's/^.* \('$at_range_start' \)/\1/'`

Not your fault, but should we simplify and remove the -e from the sed
invocation?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHGX1T84KuGfSFAYARAsCqAKCiJ9zVgjmdnWL8bodPb+n0t0B7awCbBM17
RWBBMMOR/P1SF0IqMBn+t6Y=
=afi4
-----END PGP SIGNATURE-----




reply via email to

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