-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Generating Test Coverage Statistics
Janek Bevendorff edited this page Sep 27, 2021
·
9 revisions
Please follow either the Linux, macOS, or Windows guides to setup your environment.
With gcc as your compiler, install gcovr to generate coverage profiles:
-
Ubuntu Linux:
sudo apt install gcovr -
MSYS2:
pacman -Su python3-pip && pip3 install gcovr -
macOS:
brew install gcovr
With clang, you need llvm installed:
-
Ubuntu Linux:
sudo apt install llvm -
MSYS2:
pacman -Su mingw-w64-x86_64-llvm -
macOS:
xcode-select --install(should already be done if you haveclanginstalled)
- Make a build directory for cmake and enter it
cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_COVERAGE=ON -DWITH_TESTS=ON -DWITH_GUI_TESTS=ON -DWITH_XC_ALL=ON ..make -j4 && make coverage- Open up ./coverage/index.html to view the coverage report
Copyright (C) 2016-2025 KeePassXC Team