Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
20 September 2023
In this episode, Jesper will look at what it takes to get code coverage setup with gcov and gcovr.
Links:
* cmake toolchains: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
* gcovr's home page: https://gcovr.com/
* lcov's homepage https://wiki.documentfoundation.org/Development/Lcov
* Details on gcovr's branches https://gcovr.com/en/stable/faq.html
* Bug report on custom targets https://bugreports.qt.io/browse/QTCREATORBUG-29391
* CMake integration: https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake
* Episode on speeding up the build using ninja: https://youtu.be/cKedzwAWBC0?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
0:00 Welcome
00:53 Background for the episode
01:54 Compiling with gcov without modifying the cmake files.
04:47 Run the unit tests
06:18 Running gcovr
11:17 Running gcovr on a subset of the files
12:10 gcov is accumulative
13:42 Changing the source files
15:41 Enabling code coverage from Qt Creator
20:47 Jesper, will you use gcov?
All QML tips and tricks videos : https://www.youtube.com/playlist?list=PL6CJYn40gN6jWHP5krsQrVGyYtKh3A3be
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI