--- Begin Message ---
Subject: |
t/tags-pr12372.sh assumes that etags generates tags for all files |
Date: |
Fri, 31 May 2013 11:15:42 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
Hi!
I recently installed etags on Cygwin.
$ etags --version
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Dec 11 2009, 11:42:40
Addresses: <address@hidden>, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex, +internal-sort
This caused t/tags-pr12372.sh (v1.13.2-63-gb4bfacb, i.e. not the very
latest, but close enough) to go from SKIP to FAIL.
The reason for the FAIL is that this etags program will not by default
generate any tags for file extensions it does not recognize.
Quoting from the manual:
SOURCE FILES
Unless the --language-force option is specified, the language of each
source file is automatically selected based upon a mapping of file
names to languages. The mappings in effect for each language may be
display using the --list-maps option and may be changed using the
--langmap option. On platforms which support it, if the name of a file
is not mapped to a language and the file is executable, the first line
of the file is checked to see if the file is a "#!" script for a recogā
nized language.
With that info (and with the help of the docs for the --langmap option), I
can make the test PASS *for this etags* with the below patch.
I also question if it's wise to 'cat TAGS' in the test, as I have
non-printable characters the tags files.
Cheers,
Peter
diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh
index 4eeb9be..14b500e 100644
--- a/t/tags-pr12372.sh
+++ b/t/tags-pr12372.sh
@@ -63,7 +63,7 @@ $AUTOMAKE
./configure
-$MAKE
+$MAKE ETAGSFLAGS="--langmap=c:+.pc"
cat TAGS
cat sub/TAGS
$FGREP foo-main.pc TAGS
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#14517: t/tags-pr12372.sh assumes that etags generates tags for all files |
Date: |
Mon, 03 Jun 2013 15:21:04 +0200 |
On 06/03/2013 11:47 AM, Stefano Lattarini wrote:
>
> Peter Rosin wrote:
>>
>> Yup, I'm happy to test anything you come up with (within reason :-).
>>
> Here it is. Does it work for you?
>
> PATCH] tests: fix spurious failure when 'etags' program is Exuberant Ctags
>
> Fixes automake bug#14517.
>
> * t/tags-pr12372.sh: If the 'etags' program in use supports the
> '--langmap' option, use it. That is required to avoid spurious
> failures with Exuberant Ctags (at least version 5.8), which by
> default do not generate any tags for file extensions it doesn't
> recognize.
>
I've tried the patch with etags from both Exuberant Ctags and from
Emacs, and everything works correctly. I'm thus closing this report.
Peter, please holler if the problems somehow still persists for you,
since I'm planning to release Automake 1.13.3 this evening or
tomorrow morning.
Thanks, and best regards,
Stefano
--- End Message ---