Skip to content

t/zvg_40profile.t fails when run under Devel::Cover #177

@jkeenan

Description

@jkeenan

Today I had occasion to try to get coverage statistics from DBI's test suite. I found that when I ran with Devel::Cover, t/zvg_40profile.t consistently failed. Here are my "regular" and "with-Devel-Cover" results:

$ prove -b t/zvg_40profile.t 
t/zvg_40profile.t .. ok     
All tests successful.
Files=1, Tests=60,  1 wallclock secs ( 0.01 usr  0.00 sys +  0.81 cusr  0.00 csys =  0.82 CPU)
Result: PASS
[dbi] 2029 $ HARNESS_PERL_SWITCHES=-MDevel::Cover prove -b t/zvg_40profile.t 
t/zvg_40profile.t .. 1/60 
#   Failed test at ./t/40profile.t line 91.
#     Structures begin differing at:
#          $got->{Data}{do}{40profile.t line 80 via zvg_40profile.t line 4} = Does not exist
#     $expected->{Data}{do}{40profile.t line 80 via zvg_40profile.t line 4} = ARRAY(0x5ba883dda1b0)
bless( {
  'Data' => {
    'do' => {
      '40profile.t line 80' => [
        1,
        '0.00059199333190918',
        '0.00059199333190918',
        '0.00059199333190918',
        '0.00059199333190918',
        '1751552786.19739',
        '1751552786.19739'
      ]
    }
  },
  'Path' => [
    '!MethodName',
    '!Caller2'
  ]
}, 'DBI::Profile' )
t/zvg_40profile.t .. 44/60 # Looks like you failed 1 test of 60.
t/zvg_40profile.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/60 subtests 

Test Summary Report
-------------------
t/zvg_40profile.t (Wstat: 256 (exited 1) Tests: 60 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
Files=1, Tests=60,  1 wallclock secs ( 0.01 usr  0.01 sys +  1.41 cusr  0.02 csys =  1.45 CPU)
Result: FAIL

Do you know why this is happening?

The t/zvg_*.t tests appear to be wrappers around earlier tests. I suspect that running t/zvg_40profile.t under Devel::Cover doesn't improve the coverage ratios. Would it be possible to skip this test if we're running under Devel::Cover?

Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions