Branch Coverage

blib/lib/Test2/IPC/Driver/Files.pm
Criterion Covered Total %
branch 101 134 75.3


line true false branch
31 0 83 unless $tmpdir
36 1 82 if $ENV{'T2_KEEP_TEMPDIR'}
62 1 37 unless my $type = &blessed($e)
64 1 36 unless $type->isa('Test2::Event')
82 1 91 if -e $hfile
85 0 91 unless open my $fh, '>', $hfile
97 1 55 unless -e $hfile
100 0 55 unless open my $fh, '<', $hfile
104 0 55 unless $pid == $$
107 0 55 unless 0 == $tid
110 1 54 if ($ENV{'T2_KEEP_TEMPDIR'}) { }
112 0 1 unless $ok
116 0 54 unless $ok
119 0 55 unless opendir my $dh, $tdir
123 2 167 if $file =~ /\.complete$/
124 166 1 unless $file =~ /^$hid/
126 0 1 unless eval {
130 54 1 unless keys %bad
147 0 1 unless defined $data
158 21 18 $global ? :
160 1 38 unless $global or -f $hfile
176 21 15 if ($global)
189 35 1 if ($ok) { }
190 0 35 unless $ren_ok
226 0 0 unless eval {
228 0 0 unless open my $fh, '>>', $abort
230 0 0 unless close $fh
241 0 743 unless opendir my $dh, $tempdir
248 13 13 unless ($info->{'global'})
253 0 13 if ($next != $info->{'eid'})
255 0 0 unless 5 < time - $$timeouts{$info->{'file'}}
267 13 13 if $info->{'global'}
269 1 12 if ($ENV{'T2_KEEP_TEMPDIR'}) { }
272 0 1 unless $ok
276 0 12 unless $ok
289 5 125 if my $complete = substr($file, -9, 9) eq '.complete' || 0
290 124 6 if my $ready = substr($file, -6, 6) eq '.ready' || 0
293 104 26 $parts[0] eq 'GLOBAL' ? :
314 1486 1175 if substr($file, 0, 1) eq '.'
315 1052 123 if substr($file, 0, 3) eq 'HUB'
316 0 123 if $file eq 'ABORT'
320 3 120 if $parsed->{'complete'}
321 4 116 unless $parsed->{'ready'}
322 1 115 unless $parsed->{'global'} or $parsed->{'hid'} eq $hid
324 85 30 if $parsed->{'global'} and $self->{'globals'}{$hid}{$file}++
328 0 30 if ${^TAINT}
337 8 42 if $Test2::IPC::Driver::Files::a->{'global'} and not $Test2::IPC::Driver::Files::b->{'global'}
338 4 38 if $Test2::IPC::Driver::Files::b->{'global'} and not $Test2::IPC::Driver::Files::a->{'global'}
350 1 30 unless &blessed($obj)
353 2 28 unless ($obj->isa('Test2::Event'))
358 1 1 unless $ok
361 1 0 unless $obj->isa('Test2::Event')
383 1 57 unless defined $self->pid
384 1 56 unless defined $self->tid
386 2 54 unless $$ == $self->pid
387 1 53 unless 0 == $self->tid
393 0 53 if (-e $abort_file)
396 0 0 unless $ok
399 0 53 unless opendir my $dh, $tempdir
401 106 8 if $file =~ /^\.+$/
402 2 6 if $file =~ /\.complete$/
406 5 1 if ($aborted or $file =~ /^(GLOBAL|HUB$sep)/)
409 1 4 if $ENV{'T2_KEEP_TEMPDIR'}
411 0 4 unless $ok
419 1 51 if ($ENV{'T2_KEEP_TEMPDIR'})
425 0 51 if -e $abort
426 0 51 unless rmdir $tempdir