Branch Coverage

blib/lib/App/JenkinsCli.pm
Criterion Covered Total %
branch 0 84 0.0


line true false branch
64 0 0 ref $a ? :
65 0 0 ref $b ? :
76 0 0 unless (defined $self->opt->regexp)
89 0 0 unless $job
92 0 0 unless ($result->{'buildable'})
96 0 0 if ($result->{'inQueue'} and not $self->opt->force)
108 0 0 if $result->{'queueItem'}{'why'}
116 0 0 unless @jobs
120 0 0 $result ? :
130 0 0 unless $job
137 0 0 if ($self->opt->verbose)
140 0 0 if ($self->opt->verbose > 1)
142 0 0 if ($action->{'lastBuiltRevision'})
159 0 0 unless $job
163 0 0 if ($self->opt->{'out'}) { }
180 0 0 if (@{$queue->{'items'};}) { }
198 0 0 $success ? :
216 0 0 unless (defined $self->opt->regexp)
289 0 0 if $self->opt->{'verbose'}
290 0 0 if ($self->opt->{'test'}) { }
295 0 0 if (not $success)
313 0 0 if (not $data or $@)
314 0 0 $@ ? :
318 0 0 $self->opt->regexp ? :
321 0 0 if $query and not $job->{'name'} =~ /$re/
325 0 0 if ($self->opt->{'recipient'})
332 0 0 unless $data->{'publishers'}{'hudson.tasks.Mailer'}{'recipients'} =~ /$recipient/
349 0 0 if (not $_->{'color'}) { }
0 0 elsif ($_->{'color'} =~ s/_anime//) { }
356 0 0 if ($self->opt->{'verbose'})
368 0 0 if ($details->{'lastBuild'}{'duration'})
370 0 0 if ($duration > 7200) { }
0 0 elsif ($duration >= 3600) { }
0 0 elsif ($duration > 120) { }
0 0 elsif ($duration >= 60) { }
388 0 0 if ($details->{'lastBuild'}{'displayName'} and $details->{'lastBuild'}{'builtOn'}) { }
395 0 0 unless (eval { do { my $details = $jenkins->_json_api(['job', $_->{'name'}, ('api', 'json')], {'extra_params', {'depth', 1, 'tree', 'lastBuild[timestamp,displayName,builtOn,duration]'}}); my $duration = 'Never run'; if ($details->{'lastBuild'}{'duration'}) { $duration = $details->{'lastBuild'}{'duration'} / 1000; if ($duration > 7200) { $duration = int($duration / 60 / 60) . ' hrs'; } elsif ($duration >= 3600) { $duration = '1 hr ' . int(($duration - 3600) / 60) . ' min'; } elsif ($duration > 120) { $duration = int($duration / 60) . ' min'; } elsif ($duration >= 60) { $duration = '1 min ' . ($duration - 60) . ' sec'; } else { $duration .= ' sec'; } ; } ; $extra_post .= 'DateTime'->from_epoch('epoch', ($details->{'lastBuild'}{'timestamp'} || 0) / 1000); if ($details->{'lastBuild'}{'displayName'} and $details->{'lastBuild'}{'builtOn'}) { $extra_post .= " ($duration / $details->{'lastBuild'}{'displayName'} / $details->{'lastBuild'}{'builtOn'})"; } else { $extra_post .= 'Never run'; } ; 1 } })
404 0 0 if (not $max) { }
0 0 elsif (length $name > $max) { }
409 0 0 if $space > 2
414 0 0 if ($self->opt->{'long'})
418 0 0 if ($return)