I am trying to generate code coverage report using lcov from home directory. Sorce code is compiled with -coverage option to generate coverage information at compilation time(gcno files are created). Then I have copied the executables and gcno files to home directory.I am trying to check if by ./exe in home directory ,is it possible to generate coverage report.I run the executables in /home and its showing test cases passed but it was discovered that the .gcda files are not created.
I add the following CPP flag:
-fprofile-dir= “/home”
and hence run the executable but still .gcda is not created .
Where I need to specify the path so that it will take .gcno files from home directory and generates the .gcdo files in the current directory??