File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -202,3 +202,18 @@ New dependency: dependency_name
202
202
license: SPDX license tag
203
203
origin: https://dependency_origin.com
204
204
```
205
+ ## Code coverage
206
+
207
+ After adding new functionality add tests and check coverage before and after change.
208
+ To do that, enable coverage instrumentation by enabling USE_GCOV flag in CMake.
209
+ Example flow may look like:
210
+
211
+ ``` bash
212
+ $ cmake -B build -DUSE_GCOV=1 -DCMAKE_BUILD_TYPE=Debug
213
+ $ cmake --build build -j
214
+ $ cd build
215
+ $ ctest
216
+ $ apt install lcov
217
+ $ lcov --capture --directory . --output-file coverage.info
218
+ $ genhtml -o html_report coverage.info
219
+ ```
Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ List of options provided by CMake:
123
123
| USE_TSAN | Enable ThreadSanitizer checks | ON/OFF | OFF |
124
124
| USE_MSAN | Enable MemorySanitizer checks | ON/OFF | OFF |
125
125
| USE_VALGRIND | Enable Valgrind instrumentation | ON/OFF | OFF |
126
+ | USE_GCOV | Enable gcov support | ON/OFF | OFF |
126
127
127
128
## Architecture: memory pools and providers
128
129
You can’t perform that action at this time.
0 commit comments