Autotools automatic invocation of lcov after 'make check'

Posted by disown on Stack Overflow See other posts from Stack Overflow or by disown
Published on 2010-05-20T08:41:59Z Indexed on 2010/05/20 12:40 UTC
Read the original article Hit count: 475

Filed under:
|
|
|
|

I have successfully set up an autotools project where the tests compiles with instrumentation so I can get a test coverage report.

I can get the report by running lcov in the source dir after a successful 'make check'.

I now face the problem that I want to automate this step. I would like to add this to 'make check' or to make it a separate goal 'make check-coverage'. Ideally I would like to parse the result and fail if the coverage falls below a certain percentage. Problem is that I cannot figure out how to add a custom target at all.

The closest I got was finding this example autotools config, but I can't see where in that project the goal 'make lcov' is added. I can only see some configure flags in m4/auxdevel.m4.

Any tips?

© Stack Overflow or respective owner

Related posts about autotools

Related posts about custom