any news about that ?
On Thu, 12 Apr 2007, Vincent Torri wrote:
> On Wed, 21 Mar 2007, Peter Oberparleiter wrote:
>> the correct lcov usage on projects with multiple base-directories is
>> currently somewhat... complicated.
>> As I understand it, there are two source trees in your case: lib and test
>> tool, i.e. the current working directory when compiling the test tool is
>> different from the current working directory when compiling the library.
>> This results in file paths relative to two base directories and lcov
>> stumbles over one of them.
>> My suggestion: try to call lcov twice. Once with --base-directory=test tool
>> dir and once with --base-directory=lib dir. Use --ignore-errors=gcov,source
>> to prevent the tool from aborting when it can't find a file. Specify two
>> different output files for the resulting coverage data and combine those
>> afterwards using lcov -a.
>> When you try this, please let me know if this approach worked for your
> after having programmed something else, I returned to lcov. I
> always have problems.
> I repeat where my files are located. If prefix is a directory:
> /prefix/libs/eet/src/libs <-- contains the .c files and the .libs dir of
> /prefix/test/unit/eet <-- contains the tests files.
> So, here are my commands:
> cd /prefix/test/unit/eet
> mkdir coverage
> make check <---- compiles the check files and create the .gcda files
> lcov -d . -c -o coverage/lcov_test.info -b .
> lcov -d . -c -o coverage/lcov_lib.info -b ../../../libs/eet/src/lib
> lcov -a coverage/lcov_test.info
> genhtml -o lcov ./coverage/lcov_test.info
> but what is covered is the check files, not the library files.
> Note that:
> * lcov -a coverage/lcov_lib.info
> Combining tracefiles.
> Reading tracefile coverage/lcov_lib.info
> ERROR: no valid records found in tracefile coverage/lcov_lib.info
> * genhtml -o lcov ./coverage/lcov_lib.info
> Reading data file ./coverage/lcov_lib.info
> ERROR: no valid records found in tracefile ./coverage/lcov_lib.info
> Your mail above was not very precise, so maybe some of my paths in the
> commands above are not correct.
> Do you have an idea of what can be wrong ?
> thank you
> Vincent Torri