[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AT_KEYWORDS failure: cmdline OR-combinations
From: |
Ralf Wildenhues |
Subject: |
Re: AT_KEYWORDS failure: cmdline OR-combinations |
Date: |
Tue, 16 Aug 2005 13:19:05 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi Noah,
* Noah Misch wrote on Tue, Aug 16, 2005 at 01:50:57AM CEST:
> On Mon, Aug 15, 2005 at 06:22:09PM +0200, Ralf Wildenhues wrote:
> > * tests/autotest.at (Keywords): Test keywords combinations.
>
> Marked XFAIL and Applied. Thanks.
And here's the fix for this one, three other bugs and a limitation:
a)
$ ./t -3 -3
would run each test twice.
b)
$ ./t 1-3
expr: warning: unportable BRE: `^-*-\(.*\)': using `^' as the first character
c)
$ ./t 1-1
would run all tests
d)
$ ./t 4-2
now does the same as
$ ./t 2-4
Wrt the patch below: I don't remember whether
tr ' ' '
'
poses any portability problems; Libtool instead uses
| # test EBCDIC or ASCII
| case `echo A|tr A '\301'` in
| A) # EBCDIC based system
| SP2NL="tr '\100' '\n'"
| NL2SP="tr '\r\n' '\100\100'"
| ;;
| *) # Assume ASCII based system
| SP2NL="tr '\040' '\012'"
| NL2SP="tr '\015\012' '\040\040'"
| ;;
| esac
which is arguably more readable. OTOH, in my patch no external data
are passed as input to `tr'. '\n' alone is not interpreted correctly
by Solaris 8 /usr/ucb/tr.
Cheers,
Ralf
* lib/autotest/general.m4 (AT_INIT): Add a couple of missing
m4 quotes. Process multiple keywords options correctly.
Sort and uniquify the tests that will be run.
Process ranges correctly so that N-N will run only N.
Process N-M as M-N if M is smaller than N.
* tests/autotest.at (Keywords): Unmark XFAIL.
Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.189
diff -u -r1.189 general.m4
--- lib/autotest/general.m4 27 Jul 2005 14:20:32 -0000 1.189
+++ lib/autotest/general.m4 16 Aug 2005 11:17:49 -0000
@@ -249,7 +249,6 @@
at_help_all='AT_help_all'])])dnl
m4_divert_push([PARSE_ARGS])dnl
-at_keywords=
at_prev=
for at_option
do
@@ -323,11 +322,15 @@
[[0-9][0-9][0-9]-[0-9][0-9][0-9]] | \
[[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] | \
[[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] )
- at_range_start=`expr $at_option : '\([^-]*\)'`
- at_range_end=`expr $at_option : '[^-]*-\(.*\)'`
- # FIXME: Maybe test to make sure start <= end?
+ at_range_start=`expr $at_option : '\([[^-]]*\)'`
+ at_range_end=`expr $at_option : '[[^-]]*-\(.*\)'`
+ if test $at_range_start -gt $at_range_end; then
+ at_tmp=$at_range_end
+ at_range_end=$at_range_start
+ at_range_start=$at_tmp
+ fi
at_range=`echo " $at_groups_all " | \
- sed -e 's,^.* '$at_range_start' ,'$at_range_start' ,' \
+ sed -e 's,^.* '$at_range_start' , '$at_range_start' ,' \
-e 's, '$at_range_end' .*$, '$at_range_end','`
at_groups="$at_groups$at_range "
;;
@@ -337,7 +340,17 @@
at_prev=--keywords
;;
--keywords=* )
- at_keywords="$at_keywords,$at_optarg"
+ at_groups_selected=$at_help_all
+ for at_keyword in `IFS=,; set X $at_optarg; shift; echo address@hidden
+ do
+ # It is on purpose that we match the test group titles too.
+ at_groups_selected=`echo "$at_groups_selected" |
+ grep -i "^[[^;]]*;[[^;]]*.*[[; ]]$at_keyword[[ ;]]"`
+ done
+ at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
+ # Smash the end of lines.
+ at_groups_selected=`echo $at_groups_selected`
+ at_groups="$at_groups$at_groups_selected "
;;
m4_divert_pop([PARSE_ARGS])dnl
dnl Process *=* last to allow for user specified --option=* type arguments.
@@ -362,23 +375,14 @@
esac
done
-# Process the --keywords
-if test -n "$at_keywords"; then
- at_groups_selected=$at_help_all
- for at_keyword in `IFS=,; set X $at_keywords; shift; echo address@hidden
- do
- # It is on purpose that we match the test group titles too.
- at_groups_selected=`echo "$at_groups_selected" |
- grep -i "^[[^;]]*;[[^;]]*.*[[; ]]$at_keyword[[ ;]]"`
- done
- at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
- # Smash the end of lines.
- at_groups_selected=`echo $at_groups_selected`
- at_groups="$at_groups$at_groups_selected "
-fi
-
# Selected test groups.
-test -z "$at_groups" && at_groups=$at_groups_all
+if test -z "$at_groups"; then
+ at_groups=$at_groups_all
+else
+ at_groups=`echo $at_groups | tr ' ' '
+' | sort -nu | tr '
+' ' '`
+fi
m4_divert_pop([PARSE_ARGS_END])dnl
m4_divert_push([HELP])dnl
Index: tests/autotest.at
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/autotest.at,v
retrieving revision 1.7
diff -u -r1.7 autotest.at
--- tests/autotest.at 15 Aug 2005 23:47:58 -0000 1.7
+++ tests/autotest.at 16 Aug 2005 09:35:42 -0000
@@ -248,7 +248,6 @@
## --------- ##
AT_SETUP([Keywords])
AT_KEYWORDS([autotest])
-AT_XFAIL_IF(:)
AT_DATA([k.at],
[[m4_define([AT_PACKAGE_STRING],[k])
- AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/15
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Noah Misch, 2005/08/15
- Re: AT_KEYWORDS failure: cmdline OR-combinations,
Ralf Wildenhues <=
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/17
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Stepan Kasal, 2005/08/23