Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^12: Creating coverage big report

by ovedpo15 (Pilgrim)
on Oct 09, 2019 at 23:14 UTC ( [id://11107272]=note: print w/replies, xml ) Need Help??


in reply to Re^11: Creating coverage big report
in thread Creating coverage big report

I tried to create a small test and check where the problem is coming from.
setenv DEVEL_COVER_DB_FORMAT JSON setenv PERL5OPT "-MDevel::Cover=+ignore,/cov/,/data/,-silent,1,-summar +y,0,+select,project/" ./script.pl unsetenv PERL5OPT /usr/pkgs/perl/5.14.1/bin/cover
The script looks like:
#!/usr/pkgs/perl/5.14.1/bin/perl use strict; use warnings; my $cmd = "/project/bin/create_d.pl --data abc system($cmd); print("Done"); exit(0);
I unset PERL5OPT because if not and I run the cover script it fails with:
/usr/pkgs/perl/5.14.1/bin/cover shouldn't be run with coverage turned +on.
Anyway, after unsetting PERL5OPT I run the cover script and get:
Reading database from /play_ground/cov/cover_db found cover.13 in /play_ground/cov/cover_db/runs/1570662588.11726.0385 +0 at /usr/pkgs/perl/5.14.1/lib64/module/r3/x86_64-linux/Devel/Cover/D +B.pm line 203. Devel::Cover: /play_ground/cov/cover_db/runs/1570662588.11726.03850 is + an invalid database found cover.13 in /play_ground/cov/cover_db/runs/1570662590.11725.0717 +0 at /usr/pkgs/perl/5.14.1/lib64/module/r3/x86_64-linux/Devel/Cover/D +B.pm line 203. Devel::Cover: /play_ground/cov/cover_db/runs/1570662590.11725.07170 is + an invalid database ---------------------------------------------------------------------- +------- File ---------------------------------------------------------------------- +------- Total ---------------------------------------------------------------------- +------- HTML output written to /play_ground/cov/cover_db/coverage.html done.
I use only one version and that is 5.14.1 - both in coverage, script's shabeng and all of the project's scripts. So I does not seems to be a version issue. Any ideas what it also could be?

Replies are listed 'Best First'.
Re^13: Creating coverage big report
by jcb (Parson) on Oct 09, 2019 at 23:24 UTC

    You may have some kind of strange filesystem problem — how are your filenames flipping between /play_ground/cov/... and /apollo_dev/apollo_tests/play_ground/cov/...?

    You have broken something or you are tickling a bug in Devel::Cover. The first suggestion I have is to remove all of the options and set PERL5OPT to exactly "-MDevel::Cover". You may be specifying options such that Devel::Cover ends up not actually including anything and producing an invalid database.

    And until you get this sorted out, remember to delete the coverage database after each change, so we do not have an old coverage database hanging around to give us bad data.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11107272]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found