gcov to Clover Reports in Bamboo

I am using gcov to generate coverate reports against our legacy C code base. Then I use gcov_to_clover.py to convert the gcov reports to Clover XML reports.

In Bamboo, on the "Plan Summary" page, there is a Clover tab, and it looks like it's supposed to (I think... there's a % summary, and charts for coverage history and lines of code history).

There is also a Clover tab on the "Job Summary" page, but this one does not show any reports. Given our gcov to Clover method, is it possible to have coverage statistics displayed on the "Job Summary" -> Clover page?

This page:

https://confluence.atlassian.com/display/BAMBOO/Getting+gcov+results+in+Clover+coverage+summary

says "it is possible to display C/C++ coverage statistics on "Clover" tab on "Job Summary" and "Plan Summary" pages," but I do not understand how to get it going. I have the Clover Report (System) artifact definition pointing to the root directory of the build, with file pattern **/clover.xml. I suspect this is not right. I believe this would normally point to the html artifacts produced by Clover, and I am not sure what it should point to in my case, since gcov does not produce the same type of html reporting.

If it's not possible, that's fine (having coverage summaries at all is more than I expected), but I just want to be sure before I stop digging. Any help is appreciated!

2 answers

1 accepted

This widget could not be displayed.

Hello Aaron,

The "Clover Report (System)" artifact is required for HTML report, so it's not applicable in your case; you can remove it.

Due to fact that gcov_to_clover.py creates XML report you have to enter it's location in the Clover XML Location field on the "Job configuration > Miscellaneous" page.

See:

Cheers
Marek

PS: you shall see just basic statistics like these:

Viewing+the+Clover+code-coverage+for+a+build

Thanks -- I am exploring the use of lcov to generate the HTML reports, and then just pointing the Clover Reporting (System) artifact to them. Seems like I would be able to get very near the Clover HTML reports this way.

Hey Aaron, did you ever get this working?

This widget could not be displayed.

Actually, we also got lcov working for html reports. Simply

a) instrument your code with --coverage and run the gcov_to_clover.py as described to create clover.xml

b) execute your tests to create gcda files

c) add the following two tasks to your job:

lcov --capture --base-directory . --directory . --output-file coverage.info --no-external

genhtml coverage.info --output-directory target/site/clover

The first command will create the LCOV report, the second command will create the html output in the target/site/clover subdirectory, which is where bamboo expects it. Note that the lines of code coverage history that you can see under "Show history" is taken from the clover.xml file and not from the html report.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

207 views 3 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you