gcov2perl(1p)

gcov2perl1p

Convert gcov files to devel::cover databases

Usage

gcov2perl -h -i -v -db database gcov_files

Version

version 1.52

Overview

Convert gcov files to Devel::Cover databases.

Options

The following command line options are supported:

 -db database    - specify the database to use
 -h -help        - show help
 -i -info        - show documentation
 -v -version     - show version

Details

To obtain coverage of XS files they must first be compiled with the appropriate options. In a standard Makefile environment, such as that created by ExtUtils::MakeMaker, this can be accomplished with the command:

 HARNESS_PERL_SWITCHES=-MDevel::Cover make test \
   CCFLAGS=-O0\ -fprofile-arcs\ -ftest-coverage \
   OTHERLDFLAGS=-fprofile-arcs\ -ftest-coverage

If you have already built your object files it may be necessary to run make clean first, or to find some other way to ensure that they get rebuilt with the options gcov requires.

Now the code coverage data has been collected "gcov" needs to be run:

 gcov Mylib.xs

This will create one or more gcov files on which you can run "gcov2perl":

 gcov2perl Mylib.xs.gcov

Finally, "cover" should be run as usual with any options required:

 cover

If you are running everything with standard options, you can do all this with one command:

 cover -test

Exit status

The following exit values are returned:

 0   All files converted successfully
 >0  An error occurred.

Licence

Copyright 2001-2026, Paul Johnson ([email protected])

This software is free. It is licensed under the same terms as Perl itself.

The latest version of this software should be available from my homepage: https://pjcj.net

Releases

11 releases since Debian 4.0 (Etch); the text changed 10 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12
  10. 13
  11. Arch

From perl-devel-cover 1.52-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.