Branch Coverage

blib/lib/TaskForest/Family.pm
Criterion Covered Total %
branch 132 186 70.9


line true false branch
229 0 141 unless $$self{'name'}
309 0 106 if ($$self{'current'})
332 0 106 if $$self{'options'}{'verbose'}
342 0 632 if (-e $started_semaphore)
353 0 0 unless open F, $pid_file
356 0 0 if (/^pid: (\d+)/) { }
0 0 elsif (/^actual_start: (\d+)/) { }
0 0 elsif (/^unique_id: (\S+)/) { }
376 0 632 if (-e $hold_file)
383 0 632 if ($hold) { }
388 253 459 if ($dep->check($$self{'foreign_status'}) == 0)
397 0 632 if (-e $release_file and $hold == 0)
406 379 253 if ($ready)
408 223 156 if ($$job{'tokens'} and @{$$job{'tokens'};}) { }
421 0 106 if $$self{'options'}{'verbose'}
518 0 107 if ($job_name =~ /(^[^\-]+)--Orig/) { }
521 0 0 unless defined $$self{'jobs'}{$actual_name}
525 0 107 unless defined $$self{'jobs'}{$job_name}
533 0 107 if ($status == 1) { }
541 0 107 unless open F, $file
549 0 107 unless open F, $file
554 535 0 if ($valid_fields{$k})
560 0 107 if ($orig)
607 185 51 if ($pid = fork) { }
618 0 185 if (-e $release_file)
620 0 0 unless ($ok)
627 0 51 unless defined $pid
643 0 51 unless $TaskForest::Family::UID == $TaskForest::Family::EUID and $TaskForest::Family::GID eq $TaskForest::Family::EGID
682 0 0 unless exec "$wrapper"
782 0 141 unless $$self{'file_handle'}->open("<$dir/$file")
785 1 137 unless $ok_to_run
789 0 137 unless @$sections
806 10 589 unless ($parsed_ok)
813 4 133 if (@bad_lines)
845 95 0 if ($$self{'days'}{$today}) { }
959 141 0 if /\S/
972 140 1 if (/(start=>['"]\d+:\d+['"])/) { }
973 97 43 if (/(days=>['"][a-zA-Z0-9,]+['"])/)
974 139 1 if (m[(tz=>['"][a-zA-Z0-9/\_]+['"])]) { }
975 43 96 if (/cal[ae]nd[ae]r=>(['"][a-zA-Z0-9_]+['"])/)
981 96 43 if ($args{'days'}) { }
43 0 elsif ($args{'calendar'}) { }
986 1 666 unless ($valid_days{$day})
995 0 95 if ($self->okToRunToday($$self{'wday'}) == 0)
1004 1 42 unless (-e $calendar_file)
1011 42 0 if (open C, $calendar_file) { }
1022 0 42 if (&TaskForest::Calendar::canRunToday({'rules', \@rules, 'tz', $args{'tz'}}) ne '+')
1078 326 273 if ($first_line) { }
1079 325 1 if ($line =~ /^(([a-z0-9_]+::)?[a-z0-9_]+\([^\)]*\))*$/i) { }
1088 2 271 if ($line =~ /[a-z0-9_]+::[a-z0-9_]+\([^\)]*\)/i)
1091 266 5 if ($line =~ /^([a-z0-9_]+\([^\)]*\))*$/i) { }
1107 2 890 if ($retval == 0)
1112 2 589 if (@errors)
1154 876 16 unless ($family_name)
1162 876 16 if ($local_job) { }
1163 52 824 if ($$self{'jobs'}{$job_name}) { }
1176 824 52 unless $$self{'dependencies'}{$job_name}
1187 876 16 if ($local_job and $args =~ /^\(\S/)
1189 1 875 if $@
1194 1 874 if ($retval == 0)
1197 869 5 unless $args{'tz'}
1198 36 838 if ($args{'start'}) { }
1209 15 859 if ($args{'every'} and not $args{'every'} =~ /\D/)
1214 377 497 if ($args{'token'})
1217 399 0 if ($token =~ /^([a-z0-9_])+$/i) { }
1226 0 874 if ($args{'email'}) { }
1233 0 874 if ($args{'retry_email'}) { }
1240 2 872 if ($args{'num_retries'}) { }
1247 2 872 if ($args{'retry_sleep'}) { }
1254 0 874 if ($args{'no_retry_email'}) { }
1261 0 874 if ($args{'instructions_dir'}) { }
1268 0 874 if ($args{'retry_success_email'}) { }
1275 0 874 if ($args{'no_retry_success_email'}) { }
1339 1 459 unless ($$valid_job_args{$_})
1344 1 874 if (@errors)
1380 6 9 defined $$args{'chained'} ? :
1385 15 0 if ($until =~ /^(\d\d):(\d\d)$/) { }
1405 0 15 unless $$args{'start'}
1430 444 14 if ($chained)
1463 0 185 if (-e $file_name)
1467 0 185 unless open F, ">$file_name"
1516 12 2 unless $$seen{$j}
1518 7 7 if $$self{'dependents'}{$j}
1562 65 37 unless (-e $token_file)
1602 245 0 if ($$token_hash{$token_name}{'consumers'})
1605 167 78 if ($cur_token_count < $max_token_count) { }
1612 153 70 if ($ok)
1637 153 70 if ($self->acquireTokens($token_hash, $job_name))
1662 107 628 if ($$self{'jobs'}{$job_name}{'status'} eq 'Success' or $$self{'jobs'}{$job_name}{'status'} eq 'Failure')
1686 102 0 if (open F, $token_file) { }
1704 97 70 unless $token_hash
1706 167 0 if (open F, ">$token_file") { }
1718 562 203 if defined $value