in reply to Creating coverage big report

Set PERL5OPT in the environment to "-MDevel::Cover" before running the tcsh scripts; this will effectively add "-MDevel::Cover" to every call of perl in your test scripts without changing the scripts. Then simply run cover to generate the report. If all of your tests were run in the same directory, Devel::Cover will have already merged everything into one database. Otherwise, you will need to specify all of the coverage databases (to be merged together in-memory) when running the cover tool, but you can also use cover to write out the merged database if you want more than one report from the merged database.

Replies are listed 'Best First'.
Re^2: Creating coverage big report
by ovedpo15 (Pilgrim) on Oct 03, 2019 at 23:19 UTC
    Thank you for your fast reply.
    I set PERL5OPT to "-MDevel::Cover" and when I open the GUI of the flow runner tool, I get the follow error:
    Can't read /tests/cover_db/digests with Sereal: Sereal: Error: Bad Ser +eal header: Not a valid Sereal document. at offset 1 of input at srl_ +decoder.c line 580 at /usr/pkgs/perl/5.26.1/lib64/site_perl/linux/Dev +el/Cover/DB/IO/Sereal.pm line 34, <$fh> chunk 1. BEGIN failed--compilation aborted at /usr/common/pkgs/register/1.2/bin +/register line 2.
    The second line of register (perl script) is "use strict;" (strange).
    The tool is also contains Perl scripts so they will also get this env.
    Is it possible to pass the exactly scripts I want to get the report to? Maybe to somehow combine the makefile?
    Also, each flow creates each one run-area so the coverage reports will be in different directories. How can I merge them?

      The error is occurring during the import of Devel::Cover which occurs before actually reading the script. Is your flow runner tool making a different cover_db unrelated to Devel::Cover for its own uses? If not, simply delete (rm -r) "/tests/cover_db" and any similar directories that appear in later errors. If so, try setting DEVEL_COVER_OPTIONS to "-db /PATH/TO/COVERAGE/DB" to specify a path that the flow runner will not be using.

      You can merge multiple databases by simply mentioning all of them on the command line for cover. You can use the -write NEWDB option to write the merged database or simply merge the databases in-memory and immediately produce a report.

        You were right. I opened the GUI second time and then it failed.
        Another error I'm having is:
        /tools/bin/check_status_file.pl -f steps malformed JSON string, neither array, object, number, string or atom, +at character offset 0 (before "=\x{f3}rl\x{4}\x{0}(...") at /usr/pkgs +/perl/5.14.1/lib64/module/default/x86_64-linux/Devel/Cover/DB/IO/JSON +.pm line 33 BEGIN failed--compilation aborted at /tools/bin/check_status_file.pl l +ine 2
        Do you have idea why I'm having? Also, can the coverage module get the a makefile with proper structure of the scripts I want to get usage from?