Can I get Perl Devel :: Cover to generate a coverage report if I kill the assembly build process before it is complete?

If I manage to start Devel :: Cover successfully and it starts collecting data in the cover_db directory, can I then delete this process and then after receiving the fact get Devel :: Cover or some other utility for processing these Devel binaries :: Does a cover run files and structure files in an HTML coverage report?

To ask a question in a different way ... Can I use Devel :: Cover to get a coverage report for a process that I cannot stop but to kill the process?

This question is related to: How to get Perl CGI script code coverage when running Selenium?

+4
source share
1 answer

I usually handle this (say, to run tests on servers):

  • Create an __DIE__ handler for the Perl process. This ensures that the process completes normally and that Devel :: Cover terminates the DB population.

  • Send SIGINT to the process of starting a new DIE handler.

  • run the cover program in the cover_db directory after the process is dead.

+3
source

Source: https://habr.com/ru/post/1310803/