coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH 2/2] doc: tweak 'lcov' in HACKING


From: Assaf Gordon
Subject: Re: [PATCH 2/2] doc: tweak 'lcov' in HACKING
Date: Fri, 14 Dec 2012 11:55:04 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4

Hello Bernhard,

Bernhard Voelker wrote, On 12/14/2012 03:29 AM:
> splitting the discussion about the 2 patches ...
> 
> On 12/13/2012 08:29 PM, Assaf Gordon wrote:
>> [...]
>> The second changes parameters for 'lcov' example - the current parameters
>> produce wrong output (the source files are not found, with LCOV version 1.9 
>> ).
> 
> Thanks.
> 
>> [PATCH 2/2] doc: tweak 'lcov' in HACKING
> 
> I also noticed the lcov issue recently, but didn't find the time
> to fix HACKING. Furthermore, I'm not sure if lcov-1.9 is the reason
> for the problem - I think it worked some time ago ... and according
> to 'rpm -q -changelog lcov', I already have 1.9 since about Jan or
> Feb 2011.
> 
> It think the reason might be the new non-recursive build system.
> 
> And furthermore, the second lcov call still fails here:
> 
>   $ lcov -t coreutils -q -d src -b `pwd` -o src.lcov -c
>   <built-in>:cannot open source file
>   geninfo: ERROR: cannot read <built-in>.gcov!
> 
> Don't you get that, too?
> 

The following commands work on my system, generating a coverage report from a 
clean repository:

   git clone git://git.sv.gnu.org/coreutils.git coreutils_test
   cd coreutils_test/
   ./bootstrap
   ./configure CFLAGS="-g -fprofile-arcs -ftest-coverage"
   make -j 4
   make -j 4 check
   lcov -t coreutils -q -d lib -b `pwd` -o lib.lcov -c
   lcov -t coreutils -q -d src -b `pwd` -o src.lcov -c
   genhtml -p `pwd` -t coreutils -q --output-directory lcov-html *.lcov   

The two "lcov" invocations do produce some warnings, like so:

    $ lcov -t coreutils -q -d lib -b `pwd` -o lib.lcov -c
    geninfo: WARNING: no data found for 
/home/gordon/temp/coreutils_test/lib/mbuiter.h
    < snip >
    Cannot open source file parse-datetime.y
    Cannot open source file parse-datetime.c
    
    $ lcov -t coreutils -q -d src -b `pwd` -o src.lcov -c
    geninfo: WARNING: no data found for 
/home/gordon/temp/coreutils_test/lib/stat-time.h
    geninfo: WARNING: no data found for 
/home/gordon/temp/coreutils_test/lib/mbchar.h
    < snip >
    geninfo: WARNING: no data found for 
/home/gordon/temp/coreutils_test/lib/openat.h
    geninfo: WARNING: no data found for /usr/include/gmp-x86_64.h
    geninfo: WARNING: no data found for 
/home/gordon/temp/coreutils_test/lib/stat-time.h
    geninfo: WARNING: no data found for 
/home/gordon/temp/coreutils_test/lib/timespec.h

But I assume this is normal/acceptable (if those files weren't covered in the 
tests).

If this flow doesn't work reliably on all systems, then the "HACKING" needs 
more tweaking...

Thanks,
 -gordon



reply via email to

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