469,142 Members | 1,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,142 developers. It's quick & easy.

code coverage tool with emacs integration?

Anybody know of one?

Actually, I have a feeling that emacs understands a standard format
for errors, which would make it really easy to implement this by
having the coverage tool print results in that format -- anybody know
where to find the details?
I also wonder if some kind of graphical display might be useful
somehow, having been inspired by this:

http://kcachegrind.sourceforge.net/

(really, I just like the pretty pictures :)
John
Jul 18 '05 #1
3 2580

John> Anybody know of one?

John> Actually, I have a feeling that emacs understands a standard
John> format for errors, which would make it really easy to implement
John> this by having the coverage tool print results in that format --
John> anybody know where to find the details?

compilation-error-regexp-alist. The simplest format to remember is

filename:linenumber:message

I'm not sure what you're after though. Code coverage tools generally emit
annotated listings, not compiler-like output. What would you like it to do,
emit file:line:msg info for the start of each run of lines which weren't
covered? How would you get any context showing you what lines in the region
had been executed at least once?

Skip

Jul 18 '05 #2
Skip Montanaro <sk**@pobox.com> writes:
[...]
compilation-error-regexp-alist. The simplest format to remember is
Thanks.

[...] emit file:line:msg info for the start of each run of lines which weren't
covered?
Yes.

How would you get any context showing you what lines in the region
had been executed at least once?


Why would I want to?

I haven't done any proper code-coverage analysis before, but I
had imagined just doing:

while 1:
uncovered = run_coverage_tool(my_code)
if not uncovered: break
jump_to(uncovered[0])
think()
write_test()
John
Jul 18 '05 #3
How would you get any context showing you what lines in the region
had been executed at least once?


John> Why would I want to?

For me, analyzing code coverage consists of studying the code in the region
around the uncovered line(s). Knowing which lines in the area have and
haven't been covered helps me analyze what's missing in my test coverage.

Skip

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

50 posts views Thread by Edward K. Ream | last post: by
IDE
49 posts views Thread by Thomas Lindgaard | last post: by
6 posts views Thread by tjm | last post: by
10 posts views Thread by Olaf Wasmuth | last post: by
5 posts views Thread by Nikhil | last post: by
1 post views Thread by =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= | last post: by
4 posts views Thread by Richard Szopa | last post: by
5 posts views Thread by ev | last post: by
24 posts views Thread by David | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.