0

I've got problmes get lcov running smooth in a Windows 7 environmet. I think there are problems with the folder structure of my project.

I have the following structure

  • D:\project\Filter_lib\Filter.c
  • D:\project\Filter_lib\Filter.h
  • D:\project\foo_lib\foo.c
  • D:\project\foo_lib\foo.h
  • D:\project\foo_lib\Test\foo_test.c
  • D:\project\foo_lib\Test\foo_test.h

Contents of the files:

Filter.h

uint32_t filter_1(void);

foo.h

void foo_init(void)

foo.c

#include foo.h
#include Filter.h
void foo_init(void)
{
...
}
static void foo_hadler(void)
{
...
}

foo_test.c

#include foo.c      // Only known way to test static functions

static void test_foo_init(void)
{
   ... test cases;
}

I've compiled the whole thing with all the needed gcc options to produce a gcov output (gcna and gcno files)

When I try to run lcov I've got the following message: geninfo.perl: WARNING: cannot find an entry for ^#^#Filer_lib#Filter.c.gcov in .gcno file, skipping file!"

I agree with geninfo that this file (^#^#Filer_lib#Filter.c.gcov) cannot be found in the .gcno file. In the .gcno file the correct include (..\Filter_lib\Filter.c) is mentioned. I debuged the thing a bit and the file ^#^#Filer_lib#Filter.c.gcov is created with the correct content but I think the filename is later not recognized.

I already read the following thread: https://sourceforge.net/p/ltp/bugs/153/ But this workaround doesn't cover my cover.

Additional infos: Compiler: MinGW32 installation in an actual version Language: C lcov: Version ported for Windows found on Github

Can anyone help me with this problem? Thanks in advance.

MKFein
  • 79
  • 1
  • 7
  • I am using lcov in Cygwin environment which works similar to a UNIX environment. Can you try using the bash shell and perl binary from MinGW package manager if available? – AmeyaVS Feb 27 '18 at 05:40
  • Honestly I don't know exactly what you mean. At the moment I managed it to modify geninfo.html that all files are found. Sadly genhtml makes problems now. I will have a closer look on this soon. – MKFein Mar 01 '18 at 05:52

0 Answers0