I'm not familiar with the proper way to do that, here is how I did it, which
is the most simple thing that worked:
- build postgres with the --enable-coverage configure flag
- build your extension against that version of postgres, and specifically
pg_config.
- run the regression tests (make installcheck)
- I've added a simple Makefile target calling gcov to generate a report,
which is directly copy-pasted from the one in postgres, IIRC (its been a long
time):
coverage:
lcov -d . -c -o
lcov.info
genhtml --show-details --legend --output-directory=coverage --
title=PostgreSQL --num-spaces=4 --prefix=./src/ `find . -name
lcov.info -
print`
>
> Best,
>
> David
--
Ronan Dunklau