Branch Coverage

blib/lib/Test/BrewBuild.pm
Criterion Covered Total %
branch 33 174 18.9


line true false branch
35 11 0 if ($self->config_file)
86 0 0 if $bad_opt
92 0 23 if (is_win()) { }
93 0 0 if $ENV{'BB_CONF'}
97 4 19 if $ENV{'BB_CONF'}
102 0 33 $^O =~ /Win/ ? :
111 0 3 if ($self->{'args'}{'nocache'}) { }
119 0 3 if $brew_info
141 1 0 unless ($timeout)
142 0 1 if ($self->{'args'}{'timeout'}) { }
156 0 1 if (ref $install eq 'ARRAY') { }
0 1 elsif ($install == -1) { }
1 0 elsif ($install) { }
158 0 0 unless $self->is_win or $version =~ /perl/
160 0 0 if ($self->is_win)
161 0 0 unless ($version =~ /_/)
163 0 0 if (not grep({$_ =~ /$version/;} @perls_available)) { }
173 0 0 unless $self->is_win
175 0 0 unless (grep {$version eq $_;} @perls_available)
180 0 0 if (grep {$version eq $_;} @perls_installed)
191 0 0 if (grep {$_ eq $perl;} @perls_installed)
204 1 0 unless keys %avail
209 0 0 if (grep {$_ eq $candidate;} @perls_installed)
219 0 1 if (@new_installs) { }
236 0 0 if ($@)
243 0 0 if not $self->{'args'}{'nocache'}
262 1 0 if ($version) { }
264 0 1 if ($self->is_win) { }
270 1 0 unless $self->{'args'}{'nocache'}
279 0 0 if ($using eq $installed_perl)
286 0 0 if ($bcmd->is_win) { }
292 0 0 unless $self->{'args'}{'nocache'}
331 0 0 if $self->{'args'}{'notest'}
352 0 0 if ($result =~ /${re_brewbuild('extract_perl_version');}/)
358 0 0 if ($result =~ /Successfully tested / and not $result =~ /FAIL/) { }
380 0 0 if $self->{'args'}{'plugin_arg'}
389 11 11 if $self->{'tempdir'}
399 0 1 is_win() ? :
422 0 0 if $mod
424 0 0 if (-f $_ and $_ =~ /\.pm$/)
439 0 0 if ref $dist
455 1 5 if (not defined $legacy and defined $self->{'args'}{'legacy'})
459 2 3 defined $legacy ? :
512 2 9 if (-f $conf_file)
527 0 0 unless open my $bblog_fh, '<', $bblog
532 0 0 if ($bbfile =~ /${re_brewbuild('check_failed');}/)
534 0 0 unless open my $bblog_wfh, '>>', $bblog
538 0 0 unless open my $build_log_fh, '<', $build_log
550 0 0 if $self->{'tempdir'}
551 0 0 if -e 'bblog/stderr.bblog'
558 2 9 defined $level ? :
565 10 1 if ($self->{'log'}->level < 6)
568 10 0 'set log level to ' . defined($level) ? :
580 0 0 if ($self->{'args'}{'plugin_arg'})
599 0 0 if ($self->{'args'}{'on'}) { }
608 0 0 unless open $wfh, '>', $fname
629 0 0 if ($bcmd->is_win) { }
645 0 0 if ($_ =~ /${re_brewbuild('extract_result');}/gsx)
667 0 0 unless open $wfh, '>', $fname
693 0 0 if -e 'Build.PL' or -e 'Makefile.PL'
694 0 0 unless -e 'dist.ini'
699 0 0 $self->is_win ? :
701 0 0 unless (grep {-x "$_/dzil";} split(/$path_sep/, $ENV{'PATH'}, 0))
710 0 0 unless open my $fh, '<', 'dist.ini'
715 0 0 if (/${re_brewbuild('extract_dzil_dist_name');}/)
718 0 0 if (/${re_brewbuild('extract_dzil_dist_version');}/)
721 0 0 if $dist and $version
733 0 0 if defined $cmd_file
744 0 0 unless ($self->{'is_dzil'})
785 0 0 if (-e $errlog)
786 0 0 unless open my $errlog_fh, '<', $errlog
800 0 0 if (/${re_brewbuild('extract_error_perl_ver');}/)
805 0 0 unless (keys %error_map)
816 0 0 if ($status ne 'FAIL' and not $self->{'args'}{'save_reports'})
822 0 0 if (defined $tested_mod) { }
825 0 0 unless open my $wfh, '>', $report
829 0 0 unless ($self->is_win)
832 0 0 if (defined $errors{'0'}) { }
839 0 0 if ('version'->parse($_) == 'version'->parse($ver))
852 0 0 unless open my $wfh, '>', $report
855 0 0 unless ($self->is_win)
858 0 0 if ('version'->parse($_) == 'version'->parse($ver))
866 0 0 if not $self->is_win
876 0 9 $self->{'args'}{'plugin'} ? :
878 9 0 'plugin param set to: ' . defined($plugin) ? :
900 0 0 if (@$args)
904 0 0 unless (grep {$arg eq $_;} @valid_args)