Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Code Coverage Features

Curran_K_
Beginner
439 Views

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
Steven_L_Intel1
Employee
439 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
Curran_K_
Beginner
439 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
Steven_L_Intel1
Employee
439 Views

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

0 Kudos
Curran_K_
Beginner
439 Views

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

0 Kudos
Steven_L_Intel1
Employee
439 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
Reply