[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-devel
Subject: Re: Gtk+ unit tests (brainstorming)
From: Havoc Pennington <hp () redhat ! com>
Date: 2006-10-30 16:55:34
Message-ID: 45462E86.5050304 () redhat ! com
[Download RAW message or body]
Tim Janik wrote:
>
> ah, interesting. could you please explain why you consider it
> such a big win?
>
Without it I think I usually write about 10% coverage, and imagine in my
mind that it is 50% or so ;-) I'm guessing this is pretty common.
With it, it was easy to just browse and say "OK, this part isn't tested
yet, this part is tested too much so we can speed up the tests," etc.
Also, if someone submits a patch with tests, you can see if their tests
are even exercising their code.
It just gives you a way to know how well you're doing and see what else
needs doing.
The special gcov replacement that bitrotted in dbus did a couple things:
- merged results from multiple executables into one report
- omitted the test harness itself from the report, i.e. without
my special hacks if you have:
if (test_failed())
assert_not_reached();
then gcov would count assert_not_reached() as an uncovered block
in the stats.
Maybe some other changes on top of gcov too, I don't remember.
The report had coverage % for the whole project, each directory, and
each file in one report. And then it spit out the annotated source for
each file.
Anyone can cobble together this kind of info with enough work, part of
the point is that --enable-coverage in configure, plus "make
coverage-report" makes it so easy to run the report that it happens much
more often.
Last time I was looking at fixing it I started hacking on a valgrind
tool as a replacement for trying to keep up with the ever-changing gcov
file format, but I didn't really work on that beyond posting a
half-baked initial patch to the valgrind list.
Havoc
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic