This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
今天晚上尝试用gcov和lcov做一个C++项目的代码覆盖率测试。这个项目是多进程的,并且其中若干进程都是长时运行 | |
的服务器端进程。试验结果说明gcov和lcov是可以胜任这一任务的。因此,为了备忘,取一简单的试验程序,说明使 | |
用的步骤是怎样的。整个过程的session log如下: | |
[root@dev2:coverage]#ls | |
hello.c Makefile myapp.c myapp.h | |
[root@dev2:coverage]#cat hello.c | |
#include <stdio.h> | |
#include "myapp.h" | |
#include <signal.h> |