Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis-CI: Make sure coverage includes XS files #92

Closed
zmughal opened this issue Mar 30, 2015 · 2 comments · Fixed by #261
Closed

Travis-CI: Make sure coverage includes XS files #92

zmughal opened this issue Mar 30, 2015 · 2 comments · Fixed by #261

Comments

@zmughal
Copy link
Member

zmughal commented Mar 30, 2015

See http://blogs.perl.org/users/nick_wellnhofer/2015/03/howto-xs-coverage-reports-on-coveralls.html.

@mohawk2
Copy link
Member

mohawk2 commented Apr 14, 2019

tl;dr: with gcc

make OPTIMIZE="-O0 --coverage" OTHERLDFLAGS="--coverage"

Replace coverage-report with:

if [ "$COVERAGE" -eq 1 ]; then cover -ignore_re '/CORE/\w+\.h$'; fi

@mohawk2
Copy link
Member

mohawk2 commented Apr 15, 2019

In fact you need to (for single-dir distros, i.e. not PDL) set OPTIMIZE and LDDLFLAGS to the values shown. For multi-dir ones, you need to override perl's %Config to achieve this. Also, gcov2perl needs running from the repo top-level to preserve filename structure, but gcov needs to be run in each subdir else it gets confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants