1

I am very new to Code Coverage and the tools that I am using currently. I was using the bullseye coverage to evaluate the code coverage for a simple "hello world" code. After compiling the code, I tried to open the .cov file and it shows 0% code coverage? The commands that I have used are 1) set COVFILE=c:.......\test.cov 2) gcc -c main.c 3) covc gcc -c main.c

After writing these commands, I can see the test.cov file being generated but the coverage browser shows 0% code coverage. Am I missing out something ? I mean the main.c has only main() and it is not getting called? How come?

aditya3524
  • 175
  • 2
  • 4
  • 12

2 Answers2

4

It seems that you haven't run the binary. You have set the COVFILE env variable, compiled your code using Bullseye gcc wrapper compiler.

Now you should run your compiled code, and only then you will see the coverage raising.

Omer Dagan
  • 14,868
  • 16
  • 44
  • 60
0

Make sure you compiled your application with the following flags:

-fprofile-arcs -ftest-coverage
Asblarf
  • 483
  • 1
  • 4
  • 14