gcovr

Is there anyway to merge cobertura coverage xml reports together?

有些话、适合烂在心里 提交于 2019-11-30 03:06:45
问题 I have c++/c application with a lots of unit tests. I would like to get overall coverage and also individual coverage of each test with condition that each test can be run only once. Format of coverage must be xml (cobertura xml) for jenkins cobertura plugin to process. So far I generate gcno files upon compilation and gcda files when source is used. Then call gcovr to get xml file. I would like to create coverage of each unit test (thus creating coverage xml for every unit test) and then

GCOVR giving empty results zero percent in MAC

房东的猫 提交于 2019-11-29 18:13:04
I have the .gcda and .gcno files in a folder, from which I am running the below command. $ gcovr -r . and the result is as below if I run gcov on the gcda files I get the proper coverage value. After a tedious search in multiple forums and countless experiments, finally I figured out the issue and resolved it. Two things are important to get the proper output from gcovr. One is from where the gcovr is executed and other is the root directory path. gcovr should be executed from the folder where the .gcda and .gcno files exist. And the root path is the folder where the source files(.c or .cpp)

Is it possible to merge coverage data from two executables with gcov/gcovr?

怎甘沉沦 提交于 2019-11-29 02:38:43
问题 On one project, I'm running the test cases on three different executables, compiled with different options. Depending on the options, some code paths are taken or not. Right now, I'm only using the coverage data from one executable. I'm using gcovr to generate a XML that is then parsed by Sonar: gcovr -x -b -r . --object-directory=debug/test > coverage_report.xml I have three sets of gcda and gcno files, but I don't know how to generate a global report of them. Is there any way to do that ?

GCOVR giving empty results zero percent in MAC

核能气质少年 提交于 2019-11-28 11:55:08
问题 I have the .gcda and .gcno files in a folder, from which I am running the below command. $ gcovr -r . and the result is as below if I run gcov on the gcda files I get the proper coverage value. 回答1: After a tedious search in multiple forums and countless experiments, finally I figured out the issue and resolved it. Two things are important to get the proper output from gcovr. One is from where the gcovr is executed and other is the root directory path. gcovr should be executed from the folder