1

I am trying to create a pdf file which shows coverage of my unit tests. And same I need to push to Jenkins. Steps:

  • I clone the repo.
  • Make the Env and Build it locally.
  • Run Batchfile for unit tests.

AND When I run gcov in my local PC, I get coverage for all the .c files as expected and I get a complete cobertura.xml which I use to generate pdf.

Here is the problem:

The same files are commited and pushed to jenkins build, But I see missing report for a single .c file.

Tried to debug the gcovr.py file, here I use

         (out,err) = subprocess.Popen( cmd, env=env, 
                                      stdout=subprocess.PIPE,
                                       stderr=subprocess.PIPE ).communicate()

Then, When I print "out" I don't see a.c.gov file creating, which I see for other files.

When tried to analyze I found in Jenkins generated "coubertura.xml" the package wasn't present, I think it is beacause .gcov file wasn't created.

Can anyone help?

Thanks in Advance.

Prawin
  • 59
  • 5
  • There are many details missing here. What gcovr versions are you using? Does Jenkins run on a Windows system? What kind of directory layout does your project use, and where in this layout are your tests and the a.c file? – amon Nov 11 '20 at 08:27

1 Answers1

0

It's my bad,

I tried shortening the name of the test.c file in Jenkins and also change names in Makefile , I got the required coverage.

Prawin
  • 59
  • 5