Reputation: 155
I'm trying to run kcov on my executable and whenever I run it I only get code coverage for standard c++ code like iostream. If I exclude that then I get "Code covered: NaN%" with 0 lines executed.
I'm trying to run on linux by using
${kcovExe} --exclude-path=${gcclibs} ${outputDir} ${myExe} ${args}
Ive looked through the git page and Ive tried to use --include-path to point to my source code but I cant seem to get it to work.
What do I need to do to get my code to show up in the coverage report?
Edit: for clarification I am building in one environment and running in another.
Upvotes: 1
Views: 519
Reputation: 155
I found that copying the code over to where I am running and using the
--replace-src-path=OriginalSourcePath:NewSourcePath
option works.
Upvotes: 1