Ryan Mansfield(deleted)
|
Re: How to start code coverage using command line options?
|
Ryan Mansfield(deleted)
09/08/2009 8:45 AM
post37503
|
Re: How to start code coverage using command line options?
Sunil Keshava wrote:
> Hello,
>
> I have an executable built with code coverage enabled in it. If I launch this executable from the QNX IDE's code
coverage perspective, then I can see that code coverage data is being collected in my target (i.e. there are few *.da
files that get created).
>
> However, if I run the executable using command line, then I dont see any *.da files being created. This should mean
that the code coverage data is not being collected (correct me if I am wrong).
>
> What are the command line options that I must provide to start code coverage? I need this info so that I can make use
of code coverage in my project.
You need to compile with -ftest-coverage -fprofile-arcs.
For example:
$ qcc -ftest-coverage -fprofile-arcs hw.c
$ ./a.out
hello world
$ ls hw.da
hw.da
Regards,
Ryan Mansfield
|
|
|