1

Trying to use bullseye for code coverage, below is the requirement -

Requirement - Project is in linux - 1. compile project in the host system - It generates multiple shared libraries Say abc.so def.so and xyz.so

  1. compile test application to validate these generated libraries (test suite is a separate image )
  2. Copy all shared libraries and test application on a different target device.
  3. Now execute test application on target device to validate functionality of different shared libraries

Now requirement is to check how much coverage this "test application" is providing.

What has been tried out so far -

  1. Installed Bullseye on linux host machine (for compiling project) 1.a. Set my environment PATH = /BullseyecoveragePath/bin @ start of the path
  2. Project compilation make file is modified to use compiler which comes with Bullseye package, also using covc

CC = /BullseyecoveragePath/bin/covc /BullseyecoveragePath/bin/gcc-4.6 CXX = /BullseyecoveragePath/bin/covc /BullseyecoveragePath/bin/g++-4.6

  1. export COVFILE=/data/test.cov
  2. export COVDIR=/Project/src/base
  3. cov01 --on

  4. Project compiled successfully (showing bullseye banner while compilation) *after minor libcov32.a library tweaking

  5. test.cov also gets generated after compilation is complete

Problem -

  1. Tried copying compiled libraries abc.so def.so and xyz.so and "test application" on the device 1.a. Copied test.cov --> /data of the target machine 1.b. export COVFILE=/data/test.cov
  2. Ran "test application" --> executed successfully
  3. Copied back test.cov to host machine to see the coverage. ??? But No change in test.cov file ???

Can someone help what am I missing or what needs to be done additionally here to make it work for -

  1. Shared libraires
  2. Between two different systems (Compiling on one and running on second)

Thanks

user3612144
  • 11
  • 1
  • 3

1 Answers1

1

It seems to me that you are doing the right steps, this is what should be necessary to generate the coverage report, according the the bullseye documentation - using shared libraries doesn't make much difference in the process.

There are some interesting things the documentation mentions which could be checked, for example:

The coverage file size does not increase due to run-time activity.

So maybe it seems the covfile is the same size, but it actually contains the coverage information? You can try viewing it with the CoverageBrowser program.

Akos Bannerth
  • 1,964
  • 18
  • 14