GCOVR giving empty results zero percent in MAC

前端 未结 1 1326
不思量自难忘°
不思量自难忘° 2020-12-22 05:47

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

相关标签:
1条回答
  • 2020-12-22 06:28

    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) exist.

    With this, the command looks like something as shown below.

    rr-mac:gcdaFolder$ gcovr -r /path_to_C_sourceFiles/ .

    For output html file below command works

    rr-mac:gcdaFolder$ gcovr --html -o Filename_rp.html -r /path_to_C_sourceFiles/ .

    Note: The dot(.) at the end is mandatory

    Hope this is helpful for those who are struck with this type of issue.

    0 讨论(0)
提交回复
热议问题