GNU bug report logs - #14517
t/tags-pr12372.sh assumes that etags generates tags for all files

Previous Next

Package: automake;

Reported by: Peter Rosin <peda <at> lysator.liu.se>

Date: Fri, 31 May 2013 09:18:02 UTC

Severity: minor

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Peter Rosin <peda <at> lysator.liu.se>
Subject: bug#14517: closed (Re: bug#14517: t/tags-pr12372.sh assumes that
 etags generates tags for all files)
Date: Mon, 03 Jun 2013 13:24:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#14517: t/tags-pr12372.sh assumes that etags generates tags for all files

which was filed against the automake package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 14517 <at> debbugs.gnu.org.

-- 
14517: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14517
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Peter Rosin <peda <at> lysator.liu.se>
Cc: 14517-done <at> debbugs.gnu.org
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

[Message part 3 (message/rfc822, inline)]
From: Peter Rosin <peda <at> lysator.liu.se>
To: bug-automake <at> gnu.org
Subject: t/tags-pr12372.sh assumes that etags generates tags for all files
Date: Fri, 31 May 2013 11:15:42 +0200
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: <dhiebert <at> users.sourceforge.net>, 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



This bug report was last modified 12 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.