You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use the cobertura output with branch coverage on C++ code. I was following the README, and generated the required .gcno and .gcda files.
Running grcov with branch coverage results in an xml file that results in line coverage results like so:
<line number="297" hits="4284" branch="true">
The template at the top of the XML file (<!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'>).
Shows the condition-coverage within its template:
<!ELEMENT line (conditions*)>
<!ATTLIST line number CDATA #REQUIRED>
<!ATTLIST line hits CDATA #REQUIRED>
<!ATTLIST line branch CDATA "false">
<!ATTLIST line condition-coverage CDATA "100%">
Meanwhile, grcov omits this from its output. I think the culprit is in this function here, and it should be outputting the results in the function:
I think this is an error with the grcov output, because it's also listed in the cobertura output template. My short-term solution was to not use branch coverage with grcov, and that works fine. However, it would be nice to have that working.
The text was updated successfully, but these errors were encountered:
Hi all,
I was trying to use the cobertura output with branch coverage on C++ code. I was following the README, and generated the required .gcno and .gcda files.
Running grcov with branch coverage results in an xml file that results in line coverage results like so:
The template at the top of the XML file (
<!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'>
).Shows the
condition-coverage
within its template:Meanwhile,
grcov
omits this from its output. I think the culprit is in this function here, and it should be outputting the results in the function:grcov/src/cobertura.rs
Line 496 in 6c1d79c
This is the expected output (but with valid data):
The reason why I'm bringing this up is because we're using the Jenkins Code Coverage plugin, and it crashes when calling recordCoverage:
We're calling recordCoverage like so:
I think this is an error with the
grcov
output, because it's also listed in the cobertura output template. My short-term solution was to not use branch coverage with grcov, and that works fine. However, it would be nice to have that working.The text was updated successfully, but these errors were encountered: