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

Feature Request: Generate xml and html outputs in a unique run #291

csauge opened this issue Jan 21, 2019 · 3 comments


Copy link

@csauge csauge commented Jan 21, 2019

Today we need to run twice the gcovr to generate a xml and a html.
It would be great to generate both during a unique execution of gcovr.

"Gcovr prints a text report by default, but can switch to XML or HTML."


This comment has been minimized.

Copy link

@latk latk commented Jan 21, 2019

Such functionality would indeed be desirable, and I have plans for that in the back of my head.

My plan is that the output selection flags like --xml will take a file name as argument, or fall back to -o/--output if no explicit value was provided. All of these should work the same:

$ gcovr --html -o coverage.html && gcovr --xml -o coverage.xml
$ gcovr --html=coverage.html --xml -o coverage.xml
$ gcovr --html=coverage.html --xml=coverage.xml

This will make it possible to run all output formats at the same time. Unfortunately, this may be a backwards-incompatible change: in gcovr --xml foo, is foo the name of the XML output or the name of a directory with coverage? Similarly, how should gcovr -xv be parsed? I don't know if argparse can be configured to stick to the old interpretation, or whether this would be an acceptable incompatibility.

I can't work on this right away. My current focus is on cleaning up the HTML output format. But separating output generators is the next step so that it becomes easier to add new generators.

If you or anyone else would like to work on this that would be very welcome, and would get this feature out much faster!


This comment has been minimized.

Copy link

@csauge csauge commented Jan 22, 2019

Thank you for this very good summary.
I am unfortunatly unable to help currently...
Thus i will wait for a future enhancement :)
Thank you for all your job.


This comment has been minimized.

Copy link

@latk latk commented Nov 6, 2019

This feature has been implemented in 2fbbe6e and will be part of gcovr 4.2, which should be released this week. Thank you for the suggestion!

@latk latk closed this Nov 6, 2019
@latk latk removed the help wanted label Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.