Branch Coverage

blib/lib/Test/Smoke/Reporter.pm
Criterion Covered Total %
branch 197 278 70.8


line true false branch
82 0 69 ref $proto ? :
84 0 69 UNIVERSAL::isa($_[0], 'HASH') ? :
69 0 @_ ? :
92 389 1129 exists $args{$_} ? :
110 0 1157 if @_
132 69 0 if ($key eq "all_defaults")
140 0 0 unless exists $CONFIG{"df_$key"}
142 0 0 if @_
158 16 50 $self->{'outfile'} ? :
50 66 @_ ? :
161 66 50 if ($result_file)
189 0 66 unless defined $nameorref
193 50 16 if (ref $nameorref eq 'SCALAR') { }
0 16 elsif (ref $nameorref eq 'ARRAY') { }
0 16 elsif (ref $nameorref eq 'GLOB') { }
204 16 0 if ($nameorref) { }
207 0 16 unless (defined $self->{'_outfile'})
234 0 66 unless defined $self->{'_outfile'}
244 258 3181 if /^\s*$/
245 133 3048 if /^-+$/
248 572 2476 if (my($status, $time) = /(Started|Stopped) smoke at (\d+)/)
249 286 286 if ($status eq 'Started') { }
283 3 elsif (defined $start) { }
256 220 63 if @new
261 66 2410 if (my($patch) = /^ \s* Smoking\ patch\s* ((?:[0-9a-f]+\s+\S+)|(?:\d+\S*)) /x)
272 3 2407 if (/^Smoking branch (\S+)/)
276 19 2391 if (/^MANIFEST /)
281 229 2162 if (s/^\s*Configuration:\s*//)
285 163 66 if defined $statarg
292 90 139 s/-D(DEBUGGING|usevmsdebug)\s*// ? :
293 90 139 if $debug eq "D"
307 139 90 unless $rpt{'config'}{$cfgarg}++
313 149 2013 if (my($cinfo) = /^Compiler info: (.+)$/)
320 344 12 if (/(?:PERLIO|TSTENV)\s*=\s*([-\w:.]+)/ and !@{$new[-1]{'results'};} || $new[-1]{'results'}[0]{'summary'} ne 'M')
347 2 2011 if (/\b(Files=[0-9]+,\s*Tests=([0-9]+),.*?=\s*([0-9.]+)\s*CPU)/) { }
198 1813 elsif (/\b(u=([0-9.]+)\s+ s=([0-9.]+)\s+ cu=([0-9.]+)\s+ cs=([0-9.]+)\s+ scripts=[0-9]+\s+ tests=([0-9]+))/xi) { }
366 149 1864 if (/^\s*All tests successful/)
372 39 1825 if (/Inconsistent test ?results/)
374 24 15 unless ref $rpt{$cfgarg}{$debug}{$tstenv}{'failed'}
376 24 15 if (not $rpt{$cfgarg}{'summary'}{$debug}{$tstenv} or $rpt{$cfgarg}{'summary'}{$debug}{$tstenv} ne "F")
387 0 0 $_info =~ /^ (\w+) \s+at\ test\s+ (\d+) \s* $/x || $_info =~ /^ (\w+)--(\S.*\S) \s* $/x ? :
0 0 $_info =~ /^ \w+ $/x ? :
411 63 1801 if (/^Finished smoking [\dA-Fa-f]+/)
417 18 1783 if (my($status, $mini) = /^ \s* Unable\ to \ (?=([cbmt]))(?:build|configure|make|test) \ (anything\ but\ mini)?perl/x)
423 12 6 if $mini
425 12 6 $mini ? :
443 18 1159 if (/FAILED/ or /DIED/ or /dubious$/ or /\?\?\?\?\?\?$/)
445 171 453 unless ref $rpt{$cfgarg}{$debug}{$tstenv}{'failed'}
447 612 12 if ($previous_failed ne $_)
448 582 30 unless ($rpt{$cfgarg}{'summary'}{$debug}{$tstenv} and $rpt{$cfgarg}{'summary'}{$debug}{$tstenv} =~ /[XM]/)
456 612 0 m(^ \s* # leading space ((?:\S+[/\\])? # Optional leading path to \S(?:[^.]+|\.t)+) # test file name [. ]+ # ....... ...... (\w.*?) # result \s* $)x ? :
483 132 1027 if (/PASSED/)
485 66 66 unless ref $rpt{$cfgarg}{$debug}{$tstenv}{'passed'}
489 132 0 /^ \s* (\S+?) \.+(?:\s+\.+)* (\w+) \s* $/x ? :
507 310 717 if (@captures = $_ =~ / (?:^|,)\s+ (\d+(?:-\d+)?) /gx)
511 308 2 if (ref $rpt{$cfgarg}{$debug}{$tstenv}{$previous})
518 42 675 if (/^\s+(?:Bad plan)|(?:No plan found)|^\s+(?:Non-zero exit status)/)
519 42 0 if (ref $rpt{$cfgarg}{$debug}{$tstenv}{'failed'})
530 3 63 unless exists $rpt{'statcfg'}{$statarg}
531 66 0 $rpt{'count'} ? :
546 51 15 unless (defined $self->{'is56x'})
550 51 0 if ($self->{'ddir'} and -d $self->{'ddir'})
552 49 2 if ($cfg{'version'} =~ /^\s* ([0-9]+) \. ([0-9]+) \. ([0-9]+) \s*$/x)
603 131 8 $cfg ? :
139 139 if $dbinfo eq "D"
608 12 512 if $tstenv eq "minitest" and not exists $status->{$tstenv}
611 54 458 if ($tstenv =~ /^locale:/)
613 14 40 unless $self->{'_locale_keys'}{$showenv}++
616 110 402 if $self->{'defaultenv'} and $showenv eq "stdio"
621 195 317 if (exists $status2->{$tstenv}{'failed'})
623 62 133 if (exists $failures{$failed} and @{$failures{$failed};} and $failures{$failed}[-1]{'cfg'} eq $cfg) { }
638 66 446 if (exists $status2->{$tstenv}{'passed'})
640 30 36 if (exists $todo_passed{$passed} and @{$todo_passed{$passed};} and $todo_passed{$passed}[-1]{'cfg'} eq $cfg) { }
660 12 500 if ($tstenv eq "minitest")
665 168 110 unless ($self->{'defaultenv'})
666 0 168 unless exists $status->{'perlio'}
670 0 18 unless exists $$status{"locale:$locale"}
675 138 0 /-/ ? :
362 138 /[cmMtFXO]/ ? :
679 53 13 unless defined $self->{'_locale'}
738 0 229 $^O eq 'MSWin32' ? :
767 0 0 if $self->{'log_file'}
781 121 0 if $self->{'_outfile'}
796 0 1 unless defined $self->{'_outfile'}
801 0 1 unless (open RPT, "> $name")
807 0 1 unless (close RPT)
858 0 0 $^V ? :
870 0 0 $rpt{'summary'} eq 'PASS' ? :
871 0 0 if (my $send_log = $self->{'send_log'})
872 0 0 if ($send_log eq "always" or $send_log eq "on_fail" and $rpt_fail)
879 0 0 if (my $send_out = $self->{'send_out'})
880 0 0 if ($send_out eq "always" or $send_out eq "on_fail" and $rpt_fail)
892 0 0 if (open my $jsn, '>', $jsn_file) { }
913 0 61 unless defined $self->{'_outfile'}
928 44 17 if $self->has_test_failures
930 6 55 if $self->has_mani_failures
932 27 34 if $self->has_todo_passed
939 0 0 if ($self->{'showcfg'} and $self->{'cfg'} and $self->has_test_failures)
961 0 61 if (not $self->{'user_note'} and $self->{'un_file'}) { }
0 61 elsif (not defined $self->{'user_note'}) { }
962 0 0 if (open my $unf, '<', $self->{'un_file'}) { }
984 53 20 unless ($cinfo)
1006 0 62 if @lpatches and $lpatches[0] eq "uncommitted-changes"
1007 0 62 if wantarray
1009 59 3 unless @lpatches
1024 61 0 unless $self->{'harnessonly'}
1027 0 0 unless $self->{'harness3opts'}
1042 2 0 if ($self->{'skip_tests'} and -f $self->{'skip_tests'} and open my $fh, "<", $self->{'skip_tests'})
1046 0 2 if $raw =~ /^# One test name on a line/
1052 0 62 if wantarray
1054 60 2 unless my $skipped = join("\n", @skipped)
1071 62 0 if $^O =~ /^(?:linux|.*bsd.*|darwin)/
1072 62 0 $ccinfo =~ /(gcc|bcc32)/ ? :
1074 61 1 unless ($self->{'_ccmessages_'})
1085 0 62 if wantarray
1086 0 62 unless $self->{'_ccmessages_'}
1108 61 0 if $^O =~ /^(?:linux|.*bsd.*|darwin)/
1109 61 0 $ccinfo =~ /(gcc|bcc32)/ ? :
1111 60 1 unless ($self->{'_nonfatal_'})
1121 0 61 if wantarray
1122 0 61 unless $self->{'_nonfatal_'}
1161 0 63 if ($self->{'_rpt'}{'smokebranch'})
1174 1 62 if ($self->{'un_position'} eq "top")
1195 76 42 $rptl >= 11 ? :
1227 77 32 if (@rpt_sum_stat) { }
1231 32 0 $count->{'o'} == 0 ? :
1243 61 0 if exists $_[0]{'_failures'}
1265 61 0 if exists $_[0]{'_todo_passed'}
1287 61 0 if exists $_[0]{'_mani'}
1310 0 63 unless defined $self->{'defaultenv'}
1313 10 53 if ($self->{'_locale'} and @{$self->{'_locale'};})
1326 22 40 if ($i % $half < $lcnt / 2) { }
1330 0 40 if ($self->{'perlio_only'}) { }
1334 20 20 ($i - @{$self->{'_locale'};}) % $half % 2 == 0 ? :
1339 31 31 if $i < $half
1346 11 42 $self->{'defaultenv'} ? :
0 53 $locale ? :
1393 62 0 $^V ? :
1402 62 0 if ($self->{'un_position'} ne "top")