Branch Coverage

blib/lib/Tapper/Installer/Precondition/Image.pm
Criterion Covered Total %
branch 1 98 1.0


line true false branch
40 0 0 if ($grub_device eq '')
56 0 0 unless open my $FSTAB, '>', $self->cfg->{'paths'}{'base_dir'} . '/etc/fstab'
73 0 0 unless close $FSTAB
87 0 0 if $error
90 0 0 if -e $self->cfg->{'paths'}{'base_dir'} . '/boot/initrd'
108 0 0 if $retval = $self->generate_user_grub_conf($partition)
118 0 0 if $retval = $self->configure_fstab
119 0 0 if $retval = $self->generate_grub_menu_lst
120 0 0 if $retval = $self->generate_pxe_grub
132 0 0 if (ref $devices eq 'ARRAY') { }
141 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") { }
156 0 0 unless $dev_symlink
183 0 0 if $error
188 0 0 unless open my $fh, '>', $filename
195 0 0 unless close $fh
221 0 0 if ($truncate)
225 0 0 unless open my $FILE, $mode, $menu_lst_file
227 0 0 unless close $FILE
242 0 1 if ($error)
253 0 0 if $error
255 0 0 if ($$image{'image'}) { }
257 0 0 if $retval
261 0 0 if $retval
277 0 0 if ($error)
286 0 0 if ($error)
292 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') { }
314 0 0 if ($partition_size and -s $image_file > $partition_size)
319 0 0 if $retval = $self->log_and_exec("dd if=$image_file of=$device_file")
320 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
331 0 0 if ($partition_size and -s $image_file > $partition_size)
336 0 0 if $retval = $self->log_and_exec("mkfs.ext3 -q -L $partition_label $device_file")
337 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
339 0 0 if $retval = $self->log_and_exec("tar xf $image_file -C $mount_point")
348 0 0 if ($partition_size and (-s $image_file) * $gz_factor > $partition_size)
353 0 0 if $retval = $self->log_and_exec("mkfs.ext3 -q -L $partition_label $device_file")
354 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
356 0 0 if $retval = $self->log_and_exec("tar xfz $image_file -C $mount_point")
365 0 0 if ($partition_size and (-s $image_file) * $bz2_factor > $partition_size)
370 0 0 if $retval = $self->log_and_exec("mkfs.ext3 -q -L $partition_label $device_file")
371 0 0 if $retval = $self->log_and_exec("mount $device_file $mount_point")
373 0 0 if $retval = $self->log_and_exec("tar xfj $image_file -C $mount_point")
382 0 0 unless $image_file =~ m[^/]
385 0 0 unless (-e $image_file)
398 0 0 unless -d $mount