I want to generate the coverage reports using gcov and lcov.
What I have done till now :-
1. I compiled my code using --fprofile-arcs and -fprofile-coverage in g++. 2. I have linked using lcov. 3. I have .gcno files with th e.o location. 4. When I execute binary, it is resulting into .gcda files.
What I have to do :-
I have to use these data files (.gcda) and want to create a clean report using lcov.
Problem :-
There are multiple directories in which there are source files and inside each directory I am creating an obj/ARCH dir to keep the object files.
Hence the final directory structure would be:-
proto ----> MJ1 ----> MJ2 ----> MJ3 ----> MJ4 ----> MJ5 MJ1 ----> .cpp ----> obj/linux/*.o *.gcno *.gcda MJ2 ----> .cpp ----> obj/linux/*.o *.gcno *.gcda
same with M3, M4, M5.
I am executing lcov from the proto level and it finds .gcda files but giving some error in finding .h and .C file. Any idea how to make this process path independent?
Error:- ../MjUtil/glob.h:cannot open source file ../MjUtil/MJError.h:cannot open source file ../MjUtil/OsStatisticsFile.h:cannot open source file
Thanks in advance.