line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
69187
|
use 5.006; |
|
2
|
|
|
|
|
15
|
|
2
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
40
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
1108
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package App::GhaProve; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
8
|
|
|
|
|
|
|
our $VERSION = '0.008'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $QUIET = 0; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
0
|
|
0
|
sub _system { scalar system( @_ ) } |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _maybe_warn { |
15
|
36
|
|
|
36
|
|
77
|
my ( $class, $system ) = ( shift, @_ ); |
16
|
36
|
50
|
|
|
|
101
|
return if $] > 5.012000; |
17
|
0
|
0
|
|
|
|
0
|
return if $QUIET; |
18
|
0
|
|
|
|
|
0
|
print "PERL VERSION: $]\n"; |
19
|
0
|
|
|
|
|
0
|
print "PROVE VERSION: "; |
20
|
0
|
|
|
|
|
0
|
$system->( 'prove', '-V' ); |
21
|
0
|
|
|
|
|
0
|
return; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub go { |
25
|
36
|
|
|
36
|
0
|
88662
|
my ( $class, @args ) = ( shift, @_ ); |
26
|
36
|
50
|
|
|
|
119
|
my $system = ref( $args[0] ) eq 'CODE' ? shift(@args) : \&_system; |
27
|
|
|
|
|
|
|
|
28
|
36
|
|
|
|
|
93
|
$class->_maybe_warn( $system ); |
29
|
|
|
|
|
|
|
|
30
|
36
|
|
100
|
|
|
96
|
my $testing_mode = $ENV{GHA_TESTING_MODE} || 0; |
31
|
36
|
|
100
|
|
|
132
|
my $coverage = $ENV{GHA_TESTING_COVER} || 0; |
32
|
|
|
|
|
|
|
|
33
|
36
|
100
|
|
|
|
192
|
if ( $coverage =~ /^(true|1)$/i ) { |
34
|
27
|
50
|
|
|
|
70
|
if ( length $ENV{HARNESS_PERL_SWITCHES} ) { |
35
|
27
|
|
|
|
|
70
|
$ENV{HARNESS_PERL_SWITCHES} .= ' '; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
else { |
38
|
0
|
|
|
|
|
0
|
$ENV{HARNESS_PERL_SWITCHES} = ''; |
39
|
|
|
|
|
|
|
} |
40
|
27
|
|
|
|
|
60
|
$ENV{HARNESS_PERL_SWITCHES} .= '-MDevel::Cover'; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
36
|
|
|
|
|
55
|
my @errors; |
44
|
|
|
|
|
|
|
|
45
|
36
|
100
|
|
|
|
150
|
if ( $testing_mode !~ /^(extended|1)$/i ) { |
46
|
24
|
|
|
|
|
107
|
delete $ENV{EXTENDED_TESTING}; |
47
|
24
|
50
|
|
|
|
71
|
print "# ~~ Standard testing\n" unless $QUIET; |
48
|
24
|
|
|
|
|
63
|
push @errors, $system->( 'prove', @args ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
36
|
100
|
|
|
|
363
|
if ( $testing_mode =~ /^(extended|both|1|2)$/i ) { |
52
|
24
|
|
|
|
|
90
|
$ENV{EXTENDED_TESTING} = 1; |
53
|
24
|
50
|
|
|
|
59
|
print "# ~~ Extended testing\n" unless $QUIET; |
54
|
24
|
|
|
|
|
64
|
push @errors, $system->( 'prove', @args ); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
36
|
|
|
|
|
286
|
my ( $max ) = sort { $b <=> $a } @errors; |
|
12
|
|
|
|
|
36
|
|
58
|
|
|
|
|
|
|
|
59
|
36
|
50
|
|
|
|
77
|
if ( $max > 254 ) { |
60
|
0
|
|
|
|
|
0
|
$max = 254; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
36
|
|
|
|
|
142
|
return $max; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
__END__ |