Branch Coverage

blib/lib/Test/BrewBuild.pm
Criterion Covered Total %
branch 33 178 18.5


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'}
343 0 0 if (@perls_installed == 1)
344 0 0 unless ($results =~ /${re_brewbuild('check_result');}/)
360 0 0 if ($result =~ /${re_brewbuild('extract_perl_version');}/)
366 0 0 if ($result =~ /Successfully tested / and not $result =~ /FAIL/) { }
388 0 0 if $self->{'args'}{'plugin_arg'}
397 11 11 if $self->{'tempdir'}
407 0 1 is_win() ? :
430 0 0 if $mod
432 0 0 if (-f $_ and $_ =~ /\.pm$/)
447 0 0 if ref $dist
463 1 5 if (not defined $legacy and defined $self->{'args'}{'legacy'})
467 2 3 defined $legacy ? :
520 2 9 if (-f $conf_file)
535 0 0 unless open my $bblog_fh, '<', $bblog
540 0 0 if ($bbfile =~ /${re_brewbuild('check_failed');}/)
542 0 0 unless open my $bblog_wfh, '>>', $bblog
546 0 0 unless open my $build_log_fh, '<', $build_log
558 0 0 if $self->{'tempdir'}
559 0 0 if -e 'bblog/stderr.bblog'
566 2 9 defined $level ? :
573 10 1 if ($self->{'log'}->level < 6)
576 10 0 'set log level to ' . defined($level) ? :
588 0 0 if ($self->{'args'}{'plugin_arg'})
607 0 0 if ($self->{'args'}{'on'}) { }
616 0 0 unless open $wfh, '>', $fname
637 0 0 if ($bcmd->is_win) { }
653 0 0 if ($_ =~ /${re_brewbuild('extract_result');}/gsx)
675 0 0 unless open $wfh, '>', $fname
701 0 0 if -e 'Build.PL' or -e 'Makefile.PL'
702 0 0 unless -e 'dist.ini'
707 0 0 $self->is_win ? :
709 0 0 unless (grep {-x "$_/dzil";} split(/$path_sep/, $ENV{'PATH'}, 0))
718 0 0 unless open my $fh, '<', 'dist.ini'
723 0 0 if (/${re_brewbuild('extract_dzil_dist_name');}/)
726 0 0 if (/${re_brewbuild('extract_dzil_dist_version');}/)
729 0 0 if $dist and $version
741 0 0 if defined $cmd_file
752 0 0 unless ($self->{'is_dzil'})
793 0 0 if (-e $errlog)
794 0 0 unless open my $errlog_fh, '<', $errlog
808 0 0 if (/${re_brewbuild('extract_error_perl_ver');}/)
813 0 0 unless (keys %error_map)
824 0 0 if ($status ne 'FAIL' and not $self->{'args'}{'save_reports'})
830 0 0 if (defined $tested_mod) { }
833 0 0 unless open my $wfh, '>', $report
837 0 0 unless ($self->is_win)
840 0 0 if (defined $errors{'0'}) { }
847 0 0 if ('version'->parse($_) == 'version'->parse($ver))
860 0 0 unless open my $wfh, '>', $report
863 0 0 unless ($self->is_win)
866 0 0 if ('version'->parse($_) == 'version'->parse($ver))
874 0 0 if not $self->is_win
884 0 9 $self->{'args'}{'plugin'} ? :
886 9 0 'plugin param set to: ' . defined($plugin) ? :
908 0 0 if (@$args)
912 0 0 unless (grep {$arg eq $_;} @valid_args)