GCOV2PERL(1p)
π GCOV2PERL(1p) β the "User Contributed Perl Documentation" girlies know π
okay so bestie, welcome to gcov2perl β it's a lil script that converts gcov files to Devel::Cover databases. that's the whole vibe. it's section 1p of the manual, i.e. User Contributed Perl Documentation, and yes she's iconic for it. π
β¨ VERSION β¨
version 1.52 β that's the one we're on, no cap. πΈ
π¦ SYNOPSIS π¦
gcov2perl -h -i -v -db database gcov_files
like, that's her. that's the whole entrance. π
π DESCRIPTION π
Convert gcov files to Devel::Cover databases. that's it. that's the plot. short, sweet, main character energy. β¨
π OPTIONS π
the following command line options are supported, and yes you're gonna want to know all of them:
-dbdatabase β specify the database to use. this is the one that actually matters, the rest are basically emotional support. π-h,-helpβ show help. when u need a lil hand-holding. π«Ά-i,-infoβ show documentation. the β¨loreβ¨.-v,-versionβ show version. for when u gotta know which era of her you're dealing with. β
π₯ DETAILS π₯
okay this is the part where it gets real, so pay attention bestie, bc this is literally the whole ritual. π
so to obtain coverage of XS files, they must first be compiled with the appropriate options. (not optional. "must". she said what she said.) in a standard Makefile environment β like the one that ExtUtils::MakeMaker creates β you can accomplish this with the command:
HARNESS_PERL_SWITCHES=-MDevel::Cover make test \
CCFLAGS=-O0\ -fprofile-arcs\ -ftest-coverage \
OTHERLDFLAGS=-fprofile-arcs\ -ftest-coverage
yes, those backslashes before the spaces in the flags are load-bearing. do not touch them.
now, if you have already built your object files, it may be necessary to run make clean first, or to find some other way to make sure they actually get rebuilt with the options gcov requires. like, they're not gonna magically recompile themselves, babe. π
once 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 then run gcov2perl:
gcov2perl Mylib.xs.gcov
and finally, cover should be run as usual, with any options required:
cover
and if you're running everything with standard options? you can do all of this β the entire ritual, the whole saga β with one single command:
cover -test
one command. one line. slayed. π
πΈ EXIT STATUS πΈ
the following exit values are returned:
0β All files converted successfully π₯³>0β An error occurred. π
π SEE ALSO π
Devel::Coverβ go read that one next, iykyk π¦
π§ LICENCE π§
Copyright 2001-2026, Paul Johnson (paul@pjcj.net)
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
and that's the whole page, bestie!! she's from perl v5.42.3, dated 2026-08-22, and she ate and left no crumbs. go compile something with -fprofile-arcs and live ur truth πβ¨ππ¦πΈπ
π«Άπ
π¦ where this page comes from
- ubuntu stonking: libdevel-cover-perl 1.52-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms