diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-08 10:04:11 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-08 10:04:11 +0100 |
commit | fc383e025f09af70d3eb52fcd7e03c02733b14b0 (patch) | |
tree | ade866bbc99471ac829be8f2f12411378db03a2a | |
parent | 945585b698b08b6f349e2e104862589b5acce0aa (diff) |
Document and put code coverage online
* Document our testing practices
* Put lcov code coverage output online
-rw-r--r-- | Makefile.am | 16 | ||||
-rw-r--r-- | doc/p11-kit-devel.xml | 22 |
2 files changed, 34 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 29aee65..e7d53f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,7 @@ +WEBHOST = anarchy.freedesktop.org +WEBBASE = /srv/p11-glue.freedesktop.org/www + if WITH_TRUST_MODULE TRUST_DIR = trust else @@ -40,19 +43,24 @@ coverage: $(LCOV) --directory . --zerocounters $(MAKE) check $(LCOV) --directory . --capture --output-file build/coverage.info - $(GENHTML) --output-directory build/coverage build/coverage.info + $(GENHTML) --output-directory build/coverage \ + --title "p11-kit $(PACKAGE_VERSION)" \ + build/coverage.info @echo "file://$(abs_top_builddir)/build/coverage/index.html" + +upload-coverage: coverage + rsync -Hvax build/coverage/./ $(WEBHOST):$(WEBBASE)/build/coverage/./ endif if ENABLE_GTK_DOC upload-doc: all - rsync -Hvax --exclude doc \ - doc/html/./ anarchy.freedesktop.org:/srv/p11-glue.freedesktop.org/www/doc/p11-kit/./ + rsync -Hvax --exclude doc build \ + doc/html/./ $(WEBHOST):$(WEBBASE)/doc/p11-kit/./ endif upload-release: $(DIST_ARCHIVES) gpg --detach-sign --local-user 'stef@thewalter.net' $(DIST_ARCHIVES) - scp $(DIST_ARCHIVES) $(DIST_ARCHIVES).sig anarchy.freedesktop.org:/srv/p11-glue.freedesktop.org/www/releases/ + scp $(DIST_ARCHIVES) $(DIST_ARCHIVES).sig $(WEBHOST):$(WEBBASE)/releases/ EXTRA_DIST = \ config.rpath \ diff --git a/doc/p11-kit-devel.xml b/doc/p11-kit-devel.xml index af32c54..bbe6c0a 100644 --- a/doc/p11-kit-devel.xml +++ b/doc/p11-kit-devel.xml @@ -263,6 +263,28 @@ $ make install check for unexpected conditions.</para> </section> + <section id="devel-testing"> + <title>Testing and Code Coverage</title> + + <para>As a general rule changes to p11-kit should have a tests exercising + that change. Use the <literal>make check</literal> command to run all + the tests. If you run it from a subdirectory only the tests in that + directory will be run.</para> + + <para>Build p11-kit with the <option>--enable-coverage</option> configure + option to build code coverage support.</para> + + <para>Once you've done that you can either use <literal>make coverage</literal> + to build code coverage information. Alternatively (and this is usually + easier) you can use + <ulink url="http://stef.thewalter.net/2012/12/git-coverage-useful-code-coverage.html"> + <literal>git coverage</literal></ulink> to easily check whether + you've tested the lines changed by a patch.</para> + + <para>A code coverage report is + <ulink url="http://p11-glue.freedesktop.org/build/coverage">available online</ulink></para>. + </section> + <section id="devel-debugging"> <title>Debugging Tips</title> |