gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] Test coverage


From: Christian Gagneraud
Subject: Re: [gpsd-dev] Test coverage
Date: Fri, 01 Jun 2012 22:35:23 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120421 Thunderbird/12.0

Hi all,

Any comments on this?

I find it really useful to see what kind of code coverage you get with the test-suites. For example,from [1], you can clearly see that the broadcast case of type 22, the long type 16 case, the "trim spaces on right end" code are all not tested. (and plenty of other things as well).

Chris

[1] http://www.techworks.ie/pub/chris/gpsd/coverage/aivdm/gpsd/gpsd.git/driver_ais.c.gcov.html

On 27/05/12 02:03, Christian Gagneraud wrote:
Hi,

Today, I gave a try to gcov and lcov, and the results are encouraging I
think, this is what I've done:
- 1 coverage report per testsuite run
- 1 coverage report with all the runs

The results when run on a x86 machine can be found here:
http://www.techworks.ie/pub/chris/gpsd/coverage

This is experimental stuff, I'm sure there's some problems here and there.

For the "all" testsuite, I think it is possible to merge all the
testcases belonging to each other testsuite into a corresponding single
testcase.
Attached is the diff to SConstruct. After banging my head against the
wall, I stopped trying to find a nice way to add conditionally
"--coverage", to LDFLAGS, CFLAGS and CCFLAGS, and went for a less subtle
one...
I had to change the calls to mktemp as it was complaining about not
having enough X ...
As well, the coveraging calls is unconditional, this is still
experimental, thought.

Any comments welcome!

Chris


--
Christian Gagneraud,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]