On Mon, Mar 25, 2013 at 08:37:20PM +0100, Reinhard Tartler wrote:
> The gcov/lcov are a common toolchain for visualizing code coverage with
> the GNU/Toolchain. The documentation and implementation of this
> integration was heavily inspired from the blog entry by Mike Melanson:
> http://multimedia.cx/eggs/using-lcov-with-ffmpeg/
Why do you mention gcov when you are using lcov?
> ---
> .gitignore | 4 ++++
> Makefile | 1 +
> common.mak | 2 +-
> configure | 4 ++++
> doc/developer.texi | 22 ++++++++++++++++++++++
> tests/Makefile | 9 ++++++++-
> 6 files changed, 40 insertions(+), 2 deletions(-)
>
> the IMMEDIATE: "declaration" causes the coverage.info file to be deleted
> immediately. Otherwise, the developer would have to delete it by hand
> every time he runs another test in order to get updated results with
> 'make lcov'. I count this as a huge usability gain.
Huh, you meant INTERMEDIATE, I was doubting what you meant for a second :)
What you describe sounds like a missing dependency declaration. Indeed
the list of prerequisites for coverage.info is empty. What is the
behavior you are looking for?
> --- a/.gitignore
> +++ b/.gitignore
> @@ -30,6 +33,7 @@
> /doc/avoptions_format.texi
> /doc/doxy/html/
> /doc/print_options
> +/lcov
Is that a directory? End in a / then.
> --- a/doc/developer.texi
> +++ b/doc/developer.texi
> @@ -550,6 +550,28 @@ why the expected result changed.
>
> +@subsection Visualizing Test Coverage
> +
> +The Libav build system provides means for visualizing the test coverage
> +leveraging the coverage tools @code{gcov}/@code{lcov} in an easy manner.
I'd say s/in an easy manner//, that's for the users to judge. But if
you prefer, feel free to keep it.
> +This involves the following steps:
> +
> +@enumerate
> +@item
> + Configure to compile with instrumentation enabled:
> + @code{configure --toolchain=gcov}.
Use 4 spaces as indentation. I know that there is a list in that file
that uses only 3, but let's not add more weirdness.
> +@item
> + Run your test case, either manually or via FATE.
It's not totally clear to me what you mean; "make fate" and possibly
an example would be useful IMO.
> +@item
> + Run @code{make lcov} to generate coverage data in HTML format
.
End the sentence in a period.
> +@item
> + View @code{lcov/index.html} in your preferred HTML viewer.
> +@end enumerate
> +
> +You can use the command @code{lcov --directory . --zerocounters} to
> +reset the coverage measurements. You will need to rerun @code{make lcov}
> +after running a new test.
That might be done with a separate clean target, but let's first hear
about the dependency issue.
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -123,6 +123,12 @@ $(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
>
> +coverage.info:
> + lcov -d $(CURDIR) -b $(SRC_PATH) --capture -o $@
> +
> +lcov: coverage.info
> + genhtml -o $(CURDIR)/lcov $<
What's the output for these commands? I guess we could create a proper
tag to have pretty and terse output.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel