diff --git a/docs/contributing.md b/docs/contributing.md index bb486a6db..f90f9b85b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -274,3 +274,10 @@ To auto-convert to the above syntax you can put this in an .emacs file: ;; (c-set-offset 'template-args-cont 'c-lineup-template-args) +### Generating *.gcov files with LLVM/clang toolchain to check tests coverage + +* Ensure `llvm-cov` is available +* Build and link mapnik with `--coverage` and ensure optimisation is off and profile flags is present. For example pass following options to Scons: `CUSTOM_CXXFLAGS='--coverage -g -O0' LDFLAGS='--coverage'` +* Run test(s) e.g `./test/unit/run` +* To generate *.gcov file(s) run `llvm-cov gcov ` +* *.gcov files can be viewed in text editor