Unit Test Coverage Statistics

This commit is contained in:
hxy7yx
2023-08-31 15:28:10 +08:00
parent fafc55c4ec
commit ee5f12dae3
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -36,6 +36,7 @@ if(USE_GCOV)
SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
SET(GCC_COVERAGE_LINK_FLAGS "-lgcov")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
endif(USE_GCOV)
+1 -1
View File
@@ -16,7 +16,7 @@ Generate image files .gcno and data files .gcda under build/tests/CMakeFiles/.di
Execute the following command in the build folder to generate an intermediate file for HTML:
```shell
$ lcov --capture --directory . -- output-file testneuron.info --test-name testneuron
$ lcov --capture --directory . --output-file testneuron.info --test-name testneuron
```
Execute the following command in the build folder to generate an HTML file in the result folder under the build folder: