mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
Unit Test Coverage Statistics
This commit is contained in:
@@ -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
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user