1. compile with following flags
gcc -fprofile-arcs -ftest-coverage test.c
2. run exec file, will product coverage info
3. collect coverage info by gcov
gcov test.c
4. use lcov to product graphs
lcov --directory . --capture --output-file test.info
5. use genhtml to product html style report
genhtml -o results test.info
阅读(714) | 评论(0) | 转发(0) |