Branch Coverage

blib/lib/Tapper/Installer/Precondition.pm
Criterion Covered Total %
branch 0 92 0.0


line true false branch
32 0 0 if ($type eq 'iso') { }
0 0 elsif ($type eq 'gz' or $type eq 'tgz') { }
0 0 elsif ($type eq 'tar') { }
0 0 elsif ($type eq 'bz' or $type eq 'bz2') { }
0 0 elsif ($type eq 'rpm') { }
0 0 elsif ($type eq 'deb') { }
46 0 0 unless (-e $file)
51 0 0 if ($type eq 'application/octet-stream') { }
0 0 elsif ($type eq 'application/x-dpkg') { }
0 0 elsif ($type eq 'application/x-gzip') { }
0 0 elsif ($type eq 'application/x-gtar') { }
0 0 elsif ($type eq 'application/x-bzip2') { }
53 0 0 if $error
54 0 0 if $output =~ /ISO 9660/i
55 0 0 if $output =~ /$file: RPM/i
56 0 0 if $output =~ /$file: Debian/i
78 0 0 if ($hostname =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)
79 0 0 unless ($hostname) = gethostbyaddr(inet_aton($hostname), 2)
90 0 0 unless $self->cfg->{'cleanup'}
91 0 0 unless $$order{'options'}
102 0 0 if ($$precondition{'source_url'} =~ m[^nfs://(.+/)([^/]+)(/?)$])
118 0 0 if $$precondition{'source_url'}
122 0 0 unless -d $self->cfg->{'paths'}{'guest_mount_dir'}
128 0 0 if ($$precondition{'mountfile'}) { }
0 0 elsif ($$precondition{'mountpartition'}) { }
0 0 elsif ($$precondition{'mountdir'}) { }
131 0 0 if ($$precondition{'mountpartition'}) { }
135 0 0 if $retval = $self->log_and_exec("losetup /dev/loop0 $image")
136 0 0 if $retval = $self->log_and_exec('kpartx -a /dev/loop0')
137 0 0 if $retval = $self->log_and_exec("mount /dev/mapper/loop0$partition " . $new_base_dir)
139 0 0 if $retval = $self->log_and_exec("mount -o loop $image " . $new_base_dir)
144 0 0 if $retval = $self->log_and_exec("mount $partition " . $new_base_dir)
153 0 0 if $retval = $self->install($precondition)
156 0 0 if ($$precondition{'mountfile'}) { }
0 0 elsif ($$precondition{'mountpartition'}) { }
157 0 0 if ($$precondition{'mountpartition'}) { }
158 0 0 if $retval = $self->log_and_exec("umount /dev/mapper/loop0$partition")
159 0 0 if $retval = $self->log_and_exec('kpartx -d /dev/loop0')
160 0 0 if ($retval = $self->log_and_exec('losetup -d /dev/loop0'))
162 0 0 if $retval = $self->log_and_exec('kpartx -d /dev/loop0')
163 0 0 if $retval = $self->log_and_exec('losetup -d /dev/loop0')
167 0 0 if $retval
176 0 0 if $retval
192 0 0 unless (-d $destdir)
193 0 0 unless system('mkdir', '-p', $destdir) == 0
195 0 0 unless open my $FH, '>', $destfile