How to generate test code coverage and static analysis pages

This page explains how to build test code coverage pages (generated by gcov) and static analysis pages (generated by cppcheck) in Xyst, also rendered at https://xyst.cc/coverage.html.

How to generate test code coverage and static analysis pages

Install prerequisites: Debian-based linux

apt install doxygen python3-pygments python3-jinja2 texlive-latex-base texlive-latex-extra texlive-fonts-extra lcov cppcheck

Then to clone and build the test code coverage and static analysis pages do

git clone https://codeberg.org/xyst/xyst.git && cd xyst
mkdir build && cd build
cmake -DBUILD_DOC=on -DCOVERAGE=on ../src
make doc test_coverage cppcheck-xml

The documentation will be accessible on the local file system at xyst/build/doc/html/index.html. The code coverage pages will be at xyst/build/doc/html/RELEASE/test_coverage/index.html, and the static analysis pages at xyst/build/doc/html/RELEASE/cppcheck/index.html.