[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AT_KEYWORDS failure: cmdline OR-combinations
From: |
Stepan Kasal |
Subject: |
Re: AT_KEYWORDS failure: cmdline OR-combinations |
Date: |
Tue, 16 Aug 2005 16:28:04 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello Ralf,
I noticed a problem with your patch:
On Tue, Aug 16, 2005 at 01:19:05PM +0200, Ralf Wildenhues wrote:
> + # It is on purpose that we match the test group titles too.
> + at_groups_selected=`echo "$at_groups_selected" |
> + grep -i "^[[^;]]*;[[^;]]*.*[[; ]]$at_keyword[[ ;]]"`
...
> +if test -z "$at_groups"; then
> + at_groups=$at_groups_all
> +else
> + at_groups=`echo $at_groups | tr ' ' '
> +' | sort -nu | tr '
> +' ' '`
> +fi
So --keyword might select several banners, but they are 0 for the purpose
of sort -nu. This means that one of the banners will be at the top, and all
others are removed.
I'd say that --keyword shouldn't select banners, it's not worth the problems.
It would be much better if ./testsuite 1-100 presented the banners for the
tests selected.
IOW, after making the list of unique test numbers, the banners would be
reinserted, like this:
# Do not match the test group titles.
at_groups_selected=`echo "$at_groups_selected" |
grep -i "^[[1-9]][[^;]]*;.*[[; ]]$at_keyword[[ ;]]"`
...
if test -z "$at_groups"; then
at_groups=$at_groups_all
else
# Sort the tests, removing duplicates:
at_groups=`echo $at_groups | tr ' ' '
' | sort -nu`
# and add banners.
at_groups=`echo "$at_groups
$at_groups_all" |
awk '
!/ / { selected[$1] }
/ / {
# line with at_groups_all:
for (i = 1; i <= NF; i++)
if ($i ~ /^banner-/)
banner = $i
else if ($i in selected && banner != "")
selected[banner]
for (i = 1; i <= NF; i++)
if ($i in selected)
list = list " " $i
print list
}'`
fi
Ralf, do you have time to incorporate this idea into your patch?
There one problem, though: whenever I try to write a piece of awk code,
it doesn't work with the @$%#$^* /bin/awk on Solaris.
I don't have access to Solaris, but perhaps you could debug my awk
program so that it works there.
Or we can change the end to:
print list
}' 2>/dev/null || echo $at_groups`
fi
so that we'll have the original test list without banners on systems
with broken awk.
Have a nice day,
Stepan
- 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, 2005/08/16
- Re: AT_KEYWORDS failure: cmdline OR-combinations,
Stepan Kasal <=
- 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
- Re: AT_KEYWORDS failure: cmdline OR-combinations, Ralf Wildenhues, 2005/08/17