Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
12 Views

Code Coverage Features

I am using code coverage on several tests and when I run the tool certain blocks are highlighted as uncovered but those blocks correspond to debugging. Is there a way I can program or manipulate the tool to ignore certain blocks/if statements instead of picking them up?

Thanks in advance

0 Kudos
5 Replies
Highlighted
12 Views

The techniques for doing this are described in the Code Coverage tool documentation. There are multiple options with granularity as fine as you want.

0 Kudos
Highlighted
Beginner
12 Views

I see, thank you for reminding me about the documentation.

Where exactly do I type those options about excluding code in, i.e -beginblkdsbl and -endblkdsbl?. Will it be in the source code? 

Thanks Steve

 

0 Kudos
Highlighted
12 Views

Tools > Intel Compiler > Code Coverage... > Generate Report > Settings > codecov options > Additional options

0 Kudos
Highlighted
Beginner
12 Views

So does the exclusion of certain functions only occur if they are within a comment?

0 Kudos
Highlighted
12 Views

I don't quite understand your question. There are multiple ways of excluding portions of code. You can bracket sections with "begin and end" comments, you can add a comment on a particular line, you can exclude whole source files. A function cannot be "within a comment". I don' profess to be an expert in the code coverage tool, but I thought the documentation's examples were clear. Perhaps you could show an example of what you'd like to do if you're still uncertain.

0 Kudos