Branch Coverage

blib/lib/Tapper/Installer/Precondition/Image.pm
Criterion Covered Total %
branch 10 98 10.2


line true false branch
35 0 0 if ($grub_device eq "")
51 0 0 unless open my $FSTAB, ">", $self->cfg->{'paths'}{'base_dir'} . "/etc/fstab"
68 0 0 unless close $FSTAB
82 0 0 if $error
85 0 0 if -e $self->cfg->{'paths'}{'base_dir'} . "/boot/initrd"
103 0 0 if $retval = $self->generate_user_grub_conf($partition)
113 0 0 if $retval = $self->configure_fstab
114 0 0 if $retval = $self->generate_grub_menu_lst
115 0 0 if $retval = $self->generate_pxe_grub
127 0 0 if (ref $devices eq 'ARRAY') { }
136 0 0 if (-e "$basedir/dev/disk/by-label/" . $device_id) { }
0 0 elsif (-e "$basedir/dev/disk/by-uuid/" . $device_id) { }
0 0 elsif (-e "$basedir/dev/" . $device_id or -e "$basedir/$device_id") { }
151 0 0 unless $dev_symlink
178 0 0 if $error
183 0 0 unless open my $fh, ">", $filename
190 0 0 unless close $fh
216 0 0 if ($truncate)
220 0 0 unless open my $FILE, $mode, $menu_lst_file
222 0 0 unless close $FILE
237 0 5 if ($error)
248 1 4 if $error
250 1 3 if ($image->{'image'}) { }
252 1 0 if $retval
256 0 3 if $retval
272 0 0 if ($error)
281 0 0 if ($error)
287 0 0 if ($image_type eq 'iso') { }
0 0 elsif ($image_type eq 'tar') { }
0 0 elsif ($image_type eq 'gzip') { }
0 0 elsif ($image_type eq 'bz2') { }
309 0 0 if ($partition_size and -s $image_file > $partition_size)
314 0 0 if $retval = $self->log_and_exec("dd if=$image_file of=$device_file")
315 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
326 0 0 if ($partition_size and -s $image_file > $partition_size)
331 0 0 if $retval = $self->log_and_exec("mkfs.ext3 -q -L $partition_label $device_file")
332 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
334 0 0 if $retval = $self->log_and_exec("tar xf $image_file -C $mount_point")
343 0 0 if ($partition_size and (-s $image_file) * $gz_factor > $partition_size)
348 0 0 if $retval = $self->log_and_exec("mkfs.ext3 -q -L $partition_label $device_file")
349 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
351 0 0 if $retval = $self->log_and_exec("tar xfz $image_file -C $mount_point")
360 0 0 if ($partition_size and (-s $image_file) * $bz2_factor > $partition_size)
365 0 0 if $retval = $self->log_and_exec("mkfs.ext3 -q -L $partition_label $device_file")
366 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
368 0 0 if $retval = $self->log_and_exec("tar xfj $image_file -C $mount_point")
377 0 1 unless $image_file =~ m[^/]
380 1 0 unless (-e $image_file)
393 0 3 unless -d $mount