[Bug 38840] add coverage analysis to unit tests

John Smith lbalbalba at gmail.com
Sun Aug 5 06:15:05 PDT 2012


On Sun, Aug 5, 2012 at 3:02 PM, Matúš Kukan <matus.kukan at gmail.com> wrote:
> On 5 August 2012 13:11, John Smith <lbalbalba at gmail.com> wrote:
>> LDFLAGS+='-lgcov' CFLAGS+='-fprofile-arcs -ftest-coverage'
>> CXXFLAGS+='-fprofile-arcs -ftest-coverage' CPPFLAGS+='-fprofile-arcs
>> -ftest-coverage' make
>
> If you would google for undefined reference to `__gcov_merge_add'
> You could get to
> http://stackoverflow.com/questions/566472/where-is-the-gcov-symbols
> And try LDFLAGS+='-fprofile-arcs' instead of -lgcov which seems to help
>
> Best,
> Matus

Thanks. That makes your suggestion below work :

make sal.all
cd sal
make clean
LDFLAGS+='--fprofile-arcs' CFLAGS+='-fprofile-arcs -ftest-coverage' \
CXXFLAGS+='-fprofile-arcs -ftest-coverage' \
CPPFLAGS+='-fprofile-arcs -ftest-coverage' make


I'll try LDFLAGS+='-fprofile-arcs' on the entire project now.


- John.


More information about the LibreOffice mailing list