Assume main.c and x.c are the source files.
1) Add CFLAGS / CPPFLAG -fprofile-arcs -ftest-coverage when build the project, .gcno is generated
2) Execute the program #.gcda are generarted
3) gcov main.c #main.c.gcov is generated (Optional)
4) gcov x.c #x.c.gcov is generated (Optional)
5) Gen html report
genhtml main_coverage.info --output-directory out
沒有留言:
發佈留言