[Top][All Lists]

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


From: derek
Subject: 11AT_KEYWORDS-without-commas.diff
Date: Tue, 01 Apr 2003 23:05:41 +0000

This is a fix for a bug in AT_KEYWORDS that was preventing a second call from
working.  The problem was that the comma being used as a field seperator ended
up wreaking havoc somewhere in m4_append_uniq on the second call to

I decided not to try and mess with the quoting in m4_append_uniq and
m4_append.  I just changed the field seperator AT_KEYWORDS passes to those
functions to a space instead.

The AT_KEYWORDS change below addresses the above.  The second part maybe
should have been a second patch, but it allows multiple invocations of
--keywords= to a testsuite and restricts keyword matches to whole keywords
unless maybe if the user passes a regexp to --keywords=.

Index: ChangeLog
2003-04-01  Derek Price  <address@hidden>

        * lib/autotest/general.m4 (AT_KEYWORDS): Don't use a comma as the
        seperator with m4_append_uniq().  It doesn't work.
        (AT_CLEANUP): Add `;' to end of at_help_all.
        (AT_INIT): Allow --keyword to be specified more than once.  When
        grepping $at_help_all for keywords, use the field and keyword
        seperators to ensure a complete keyword match.

--- autoconf-AT_ARG_OPTION/lib/autotest/general.m4      2003-04-01 
17:47:23.000000000 -0500
+++ autoconf/lib/autotest/general.m4    2003-04-01 11:08:14.000000000 -0500
@@ -310,7 +310,7 @@
     --keywords=* )
-       at_keywords=$at_optarg
+       at_keywords="$at_keywords,$at_optarg"
 dnl Process *=* last to allow for user specified --option=* type arguments.
@@ -342,7 +342,7 @@
     # It is on purpose that we match the test group titles too.
     at_groups_selected=`echo "$at_groups_selected" |
-                       grep -i "^[[^;]]*;[[^;]]*;.*$at_keyword"`
+                       grep -i "^[[^;]]*;[[^;]]*;.*[[; ]]$at_keyword[[ ;]]"`
   at_groups_selected=`echo "$at_groups_selected" | sed 's/;.*//'`
   # Smash the end of lines.
@@ -936,7 +936,7 @@
 # ---------------------
 # Declare a list of keywords associated to the current test group.
-[m4_append_uniq([AT_keywords], [$1], [,])])
+[m4_append_uniq([AT_keywords], [$1], [ ])])
@@ -944,7 +944,7 @@
 # Complete a group of related tests.
     $at_times_skip || times >$at_times_file

reply via email to

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