Branch Coverage

blib/lib/Tapper/PRC/Testcontrol.pm
Criterion Covered Total %
branch 89 204 43.6


line true false branch
31 0 2 unless open my $fh, '<', $filename
44 2 0 unless $captured_output =~ /\# Tapper-suite-name:/
45 2 0 unless $captured_output =~ /\# Tapper-machine-name:/
46 2 0 unless $captured_output =~ /\# Tapper-reportgroup-testrun:/
52 0 2 if $error
71 2 0 if $b_error
89 0 1 unless -d $s_path
109 0 1 unless $or_server
111 0 1 unless (open my $fh_file, '<', $s_file)
129 12 18 if (-e "$output.stdout" or -e "$output.stderr")
149 6 0 $ENV{'HARNESS_ACTIVE'} ? :
154 2 4 if (kill 0, $pid)
165 0 4 unless $pid and $pid > 1
177 0 4 unless $pid > 1
181 2 2 if (@pids)
197 18 3 unless ($program =~ m[^/])
204 19 2 if (-e $program)
205 0 19 unless (-x $program)
207 0 0 unless -x $program
210 0 19 if -d $program
211 0 19 unless -f $program or -l $program
214 21 0 unless $test_program->{'upload_before'}
226 0 21 unless defined $read and defined $write
229 0 21 unless defined $pid
231 9 12 if ($pid == 0) { }
234 9 0 unless $test_program->{'environment'}
235 0 9 unless open STDOUT, '>', "$output$appendix.stdout"
236 0 9 unless open STDERR, '>', "$output$appendix.stderr"
237 0 9 if ($chdir)
238 0 0 if (-d $chdir) { }
0 0 elsif ($chdir eq 'AUTO' and $program =~ m[^/]) { }
244 2 7 unless $test_program->{'argv'}
0 0 unless exec $program, @{[] unless $test_program->{'argv'};}
271 12 0 unless $test_program->{'upload_after'}
276 2 10 if ($test_program->{'capture'})
278 2 0 if ($test_program->{'capture'} eq 'tap') { }
0 0 elsif ($test_program->{'capture'} eq 'tap-stderr') { }
280 0 2 if $@
284 0 0 if $@
290 0 2 if $b_error
293 2 10 if ($killed)
298 2 0 $sig_name eq 'ALRM' ? :
303 3 7 if ($retval)
321 0 2 if ($guest->{'exec'}) { }
1 1 elsif ($guest->{'svm'}) { }
1 0 elsif ($guest->{'xen'}) { }
324 0 0 if (not -s $startscript) { }
330 0 0 unless (-x $startscript)
331 0 0 unless (system('chmod', 'ugo+x', $startscript) == 0)
340 0 0 unless (system($startscript) == 0)
350 1 0 if ($error)
359 1 0 if ($guest_file =~ /^(.+)\.(?:xl|svm)$/)
366 1 0 if (-e $xl) { }
0 0 elsif (-e $xm) { }
368 1 0 if ($error)
375 0 0 if ($error)
399 0 8 ($self->cfg->{'test_type'} || '') eq 'minion' ? :
411 0 0 if $error
416 0 0 if $error
428 0 0 if $error
431 0 0 unless $error
434 0 0 if $error and not -d $self->cfg->{'paths'}{'prc_nfs_mountdir'} . '/live'
449 0 11 if $self->cfg->{'reboot_counter'}
450 0 11 if $self->cfg->{'max_reboot'}
452 8 3 if $self->cfg->{'syncfile'}
454 0 11 if ($self->{'cfg'}{'testplan'})
462 0 11 ($self->cfg->{'test_type'} || '') eq 'minion' ? :
465 11 0 if $self->cfg->{'testprogram_list'}
468 0 11 if $self->{'cfg'}{'guest_number'}
473 0 11 if ($error)
480 0 11 if ($self->cfg->{'test_program'})
484 0 0 if $self->cfg->{'parameters'}
485 0 0 if $self->cfg->{'environment'}
486 0 0 if $self->cfg->{'chdir'}
510 7 8 unless $testprogram->{'parameters'}
8 7 if @{[] unless $testprogram->{'parameters'};}
518 3 7 if ($retval) { }
539 0 0 unless ref $peers eq 'ARRAY'
561 0 0 if $@
573 0 0 if ($remote)
578 0 0 if ($select->can_read(0))
584 0 0 if ($peerhosts{$remotehost}) { }
595 0 0 if ($select->can_read) { }
601 0 0 if ($peerhosts{$remotehost}) { }
618 0 0 unless $sleeptime
638 4 4 unless defined $self->cfg->{'reboot_counter'}
640 0 8 if ($self->cfg->{'log_to_file'})
647 0 8 if ($config->{'prc_nfs_server'})
648 0 0 if (my $retval = $self->nfs_mount)
653 0 8 if (my $retval = $self->create_log)
657 0 8 if ($config->{'scenario_id'})
659 0 0 if (-e $syncfile)
662 0 0 if (my $retval = $self->wait_for_sync($syncfile))
668 0 8 if ($self->{'cfg'}{'guest_count'})
669 0 0 if (my $retval = $self->guest_start)
674 7 1 unless ($self->cfg->{'reboot_counter'})
678 6 2 if ($self->cfg->{'test_program'} or $self->cfg->{'testprogram_list'})
682 2 2 if ($self->cfg->{'max_reboot'})
684 2 0 if ($self->cfg->{'reboot_counter'} < $self->cfg->{'max_reboot'})
686 0 2 unless YAML::Syck::DumpFile($config->{'filename'}, $self->{'cfg'})
704 2 0 $ENV{'HARNESS_ACTIVE'} ? :
708 2 0 if ($b_error)