devel-cover

How do I collect coverage from child processes when running `cover -test`, and not otherwise? (Devel::Cover)

只愿长相守 提交于 2020-01-14 10:42:37
问题 (I think I've seen the answer to this, but I can't find it again. The closest I have come across is this question). I am hacking on prt and am trying to get full coverage data for my changes. Some of my new tests call system($^X, 'prt', ...) to run child processes. I then test the output of those processes. However, Devel::Cover does not collect coverage data in the child processes. How do I collect that data, without causing Devel::Cover to run when I do a regular make test ? Currently I

Provision of switching Devel::Cover on/off

落爺英雄遲暮 提交于 2019-12-12 21:08:51
问题 While using Devel::Cover in a test code which tests CodeA, does Devel::Cover have an option of switching the coverage off. Is there a way to switch the coverage module on or off as per user? Test code tests CodeA. Devel::Cover commands are embedded in Test code whenever CodeA commands get tested. Does Devel::Cover include any provision where this coverage collection can be switched on or off? 回答1: There is a way to turn coverage on and off at runtime, but it seems that I have forgotten to

No coverage for runtime with Devel::Cover and ModPerl::Registry

爱⌒轻易说出口 提交于 2019-12-10 20:03:35
问题 When I'm running Devel::Cover with ModPerl::Registry , I get no coverage info except for BEGIN blocks. When I'm running the same script with Devel::Cover from command line or as a CGI, everything works alright (obviously). How can I make Devel::Cover "see" my code being executed in the runtime? Here's Devel::Cover related stuff in my httpd.conf : MaxClients 1 PerlSetEnv DEVEL_COVER_OPTIONS -db,/tmp/cover_db,-silent,1 PerlRequire /var/www/project/startup.pl Here's startup.pl : #!/usr/bin/perl

How do I change the default Module::Build / Test::More directory from “lib” to something else?

笑着哭i 提交于 2019-12-06 10:35:57
问题 Using the directory and file architecture in this Post on Perl Unit testing and Code Coverage (which btw was VERY helpful), I copied the files I'll be running unit tests and code coverage on into a new "lib" directory and it works like a charm! However, I need the module to look in an existing "scripts" directory.. I have combed through the Module::Build documentation on CPAN, but I still get a Can't find file lib/processBuildSubs.pm error Here's what I have thus far... use strict; use Module