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

Add code coverage #18

Open
brenoguim opened this issue Oct 1, 2020 · 2 comments
Open

Add code coverage #18

brenoguim opened this issue Oct 1, 2020 · 2 comments

Comments

@brenoguim
Copy link
Owner

A lot of the code is templated but it would be nice to have code coverage infrastructure.

@eullerborges
Copy link
Contributor

I actually managed to get code coverage working with codecov (which is free for open source projects), but mapping coverage to the actual repository files failed miserably.

This happens because the cmake infrastructure merges the headers into flexclass/include/flexclass.hpp under the build directory (and for installation, of course) and the test binaries are built considering that file. Given the file doesn't exist on the repository, mapping to source doesn't work properly.

Using lcov to parse the coverage results on the other hand does work, but I still didn't find a way to integrate it to get a coverage report like we get for the performance regression, unfortunately. I hit a dead-end, it seems.

@eullerborges
Copy link
Contributor

eullerborges commented Oct 20, 2020

I've also just tried to use Coveralls, which directly supports lcov and it didn't work either for the same reason: it tries to look for the file in the repository. Coverage statistics are displayed, we do get a badge, but no coverage info:
image

One option is to just use one of those two systems so that we can have a badge on the main page and numbers on the statistics, and provide a new command in cmake to generate the HTML lcov result which looks pretty decent on a browser:
image

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

No branches or pull requests

2 participants