0

I am using gcovr to generate the coverage analysis of some unit tests, and wanted to generate the HTML decision coverage report. I am using Matlab, and am calling gcov and gcovr and generating the report following the instructions in the gcov 5.1 user's manual:

[status,report] = system([path_to_my_function,' & gcovr --gcov-executable gcov --decisions --html-details -o',name_of_my_html_report])

However, I am getting all the time an error saying that --decisions command is not defined for gcov. I have been trying different locations for the command, but didn't work, and looking on the Internet, but didn't find anything.

Does anybody have an idea of the possible error I may be doing?

Thank you!

JanMalte
  • 934
  • 6
  • 17
c.belmonte
  • 11
  • 1
  • Could you please add the full error message you are getting. Maybe even the complete output. – JanMalte Jul 25 '22 at 21:49
  • Note that as of gcovr 5.1, the decision coverage analysis is *extremely* buggy. However, your gcovr command looks correct and it should create output files. What looks less correct is how you're using `system()`. Why are you passing it an array of character arrays? Why is there a leading `&` before gcovr? What is the `path_to_my_function`? – amon Jul 26 '22 at 10:20
  • Hi! @JanMalte The error I am obtaining is `usage: gcovr [options][search_paths]` `gcovr: unrecognized arguments: --decisions` Regarding @amon's question, system is a Matlab question that just takes the system command as a string, and we need the AND symbol to combine multiple commands. Path_to_my_function is only the path to the function where I am calling gcovr. – c.belmonte Aug 03 '22 at 09:44
  • If you see “gcovr: unrecognized arguments: --decisions”, then what does `gcovr --version` output? Do you have gcovr 5.1 installed, or an earlier version? – amon Aug 03 '22 at 14:21

0 Answers0