[vtk-developers] Coverage Script
Andrew Maclean
andrew.amaclean at gmail.com
Tue Sep 11 19:06:23 EDT 2012
Hi Bill,
This is really impressive, I just ran this on the vtkNamedColors class I
am developing.
I reckon I will be able to get coverage up from 93% to closer to 100%.
I was looking at the tests and I couldn't see what two functions I had
missed in the testing until I ran this!
Thank you once again for this, it is a really useful tool.
I reckon we should all be running it on the classes we have developed.
Regards
Andrew
---------- Forwarded message ----------
> From: Bill Lorensen <bill.lorensen at gmail.com>
> To: Andrew Maclean <andrew.amaclean at gmail.com>
> Cc: VTK Developers <vtk-developers at vtk.org>
> Date: Tue, 11 Sep 2012 16:39:49 -0400
> Subject: [vtk-developers] Coverage Script
> Andrew,
>
> To compute the coverage for your unit tests, (assuming a linux build),
> 0) Use Linux
> - install lcov
> - use the gcc compiler
>
> 1) Add the CMake flags:
>
> CMAKE_CXX_FLAGS:STRING=-g -O0 -fprofile-arcs -ftest-coverage
> CMAKE_C_FLAGS:STRING= -g -O0 -fprofile-arcs -ftest-coverage
>
> 2) Compile VTK for Debug
>
> CMAKE_BUILD_TYPE Debug
>
> ../VTK/Utilities/Maintenance/computeCodeCoverageLocallyForOneTest.sh
> Common/Color -R CommonColor
>
> I'll be adding a wiki page soon to document this process.
>
> Bill
>
>
> ---------- Forwarded message ----------
> From: Andrew Maclean <andrew.amaclean at gmail.com>
> To: Bill Lorensen <bill.lorensen at gmail.com>
> Cc: VTK Developers <vtk-developers at vtk.org>
> Date: Wed, 12 Sep 2012 06:46:26 +1000
> Subject: Re: [vtk-developers] Coverage Script
>
> Thanks for this
>
> Andrew
>
> Sent from an Android tablet.
> On Sep 12, 2012 6:39 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>
>> Andrew,
>>
>> To compute the coverage for your unit tests, (assuming a linux build),
>> 0) Use Linux
>> - install lcov
>> - use the gcc compiler
>>
>> 1) Add the CMake flags:
>>
>> CMAKE_CXX_FLAGS:STRING=-g -O0 -fprofile-arcs -ftest-coverage
>> CMAKE_C_FLAGS:STRING= -g -O0 -fprofile-arcs -ftest-coverage
>>
>> 2) Compile VTK for Debug
>>
>> CMAKE_BUILD_TYPE Debug
>>
>> ../VTK/Utilities/Maintenance/computeCodeCoverageLocallyForOneTest.sh
>> Common/Color -R CommonColor
>>
>> I'll be adding a wiki page soon to document this process.
>>
>> Bill
>>
>
>
> --
___________________________________________
Andrew J. P. Maclean
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120912/ff14e706/attachment.html>
More information about the vtk-developers
mailing list