[H7] Add USE_TIMER_MGMT to H7
[betaflight.git] / docs / development / TestCoverage.md
blob34161e9f217bea1293bee2e4e9130dae9ec7e8c8
1 # Test coverage analysis
3 There are a number of possibilities to analyse test coverage and produce various reports. There are guides available from many sources, a good overview and link collection to more info can be found on Wikipedia: 
5 https://en.wikipedia.org/wiki/Gcov
7 A simple report for a single test can for example be made using this command:
9 ```
10 gcov -s src/main/sensors -o obj/test/ battery_unittest.cc
11 ```
13 To produce a coverage report in XML format usable by the Cobertura plugin in Jenkins requires installation of a  Python script called "gcovr" from github:
15 https://github.com/gcovr/gcovr/tree/dev
17 Example usage in Jenkins:
19 ```
20 /gcovr-install-path/gcovr/scripts/gcovr obj/test --root=src/main -x > coverage.xml
21 ```
23 There are many other ways to produce test coverage reports in other formats, like html etc.