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 coveralls testing coverage badge #1

Open
davetcoleman opened this issue Jul 29, 2016 · 10 comments
Open

Add coveralls testing coverage badge #1

davetcoleman opened this issue Jul 29, 2016 · 10 comments
Labels
moveit day candidate This issue can likely be resolved in less than a day simple improvements This issue can likely be resolved in less than a day

Comments

@davetcoleman
Copy link
Member

The FCL project has this cool badge that indicates what percent of the project has unit tests:

screenshot from 2016-07-29 09 16 30

You can also set a minimum required coverage percent so that new pull requests require unit tests be written for significant pieces of new code. Turning on this feature is a future topic

We would like to add coveralls support in MoveIt! - it does not look too complicated. The discussion and an example on how to do this can be found here

@davetcoleman davetcoleman added help wanted please consider improving this request! simple improvements This issue can likely be resolved in less than a day and removed help wanted please consider improving this request! labels Jul 29, 2016
@130s 130s assigned 130s and unassigned 130s Aug 22, 2016
@130s
Copy link
Contributor

130s commented Aug 24, 2016

@scottpaulin I unassigned myself following your comment #23 (comment). If you can give it a try that will be great.

@scottpaulin
Copy link
Contributor

scottpaulin commented Aug 24, 2016

Sorry @130s , I should have assigned it. I have also been taking forever to get it done...

Does anyone know if catkin does something special to allow ros:: package::getPath() to work?
std::string resource_dir = ros::package::getPath("moveit_resources");

Coveralls automagically generates a make target, which creates a test executable with the package's unit tests. When I run this test executable none of the resources can be found, resulting in these errors.. Is it possible that the coveralls make target needs to be somehow catkinized, or there needs to be an environment variable set?

Edit: Have tried clicking everything but possibly need to be admin to assign an issue.

@rhaschke rhaschke added the assigned someone is/should be currently working on this label Aug 24, 2016
@rhaschke
Copy link
Contributor

Does anyone know if catkin does something special to allow ros:: package::getPath() to work?
std::string resource_dir = ros::package::getPath("moveit_resources");

The Travis script sources the devel/install space to pull in those.

However, I have prepared a fix, which will work without sourcing any workspace. This will go on top of moveit/moveit_resources#7 and #83.

@scottpaulin
Copy link
Contributor

update: currently dependant on fixing failing assertions in unit tests (when debug build is used).

@v4hn
Copy link
Contributor

v4hn commented Oct 8, 2017

@scottpaulin what is the state here? Did you upload your progress somewhere? Is there anything to upload yet?

Does it make sense to label this for this wmd for someone to pick?

@v4hn v4hn removed the assigned someone is/should be currently working on this label Oct 8, 2017
@scottpaulin
Copy link
Contributor

I couldn't quite get it going sorry. It requires the CI to do a Debug build, which resulted in Travis timeouts at the time. Would be awesome if someone could pick it up.

@v4hn v4hn added the moveit day candidate This issue can likely be resolved in less than a day label Oct 10, 2017
@davetcoleman
Copy link
Member Author

@rhaschke recently setup ccaching for Travis, and I contacted Travis a while back about expanding our build time. @scottpaulin do you think we could try this again? could you share the branch you began working on this? @bailaC might be interested in picking this up where you left off

@scottpaulin
Copy link
Contributor

Nice!

It is under the coveralls branch. From memory some flags need to be set in cmakelists files, a debug build needs to be performed (possibly with gcov enabled), and then the results need to be uploaded to coveralls. There is a tool that may be of use for uploading the results.

Adding the badge afterward is fairly simple.

@davetcoleman
Copy link
Member Author

Thanks for these notes!

@agutenkunst
Copy link
Contributor

agutenkunst commented Oct 25, 2018

Open PR

We quickly were able to demonstrate that coverage generation using
https://github.com/mikeferguson/code_coverage works.

We currently use it in https://github.com/PilzDE/pilz_industrial_motion/tree/kinetic-devel/pilz_trajectory_generation

See PR
#1133

Generated Overview
moveit_core_coverage

Here the complete report:
moveit_core_coverage.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
moveit day candidate This issue can likely be resolved in less than a day simple improvements This issue can likely be resolved in less than a day
Projects
None yet
Development

No branches or pull requests

6 participants