Branch Coverage

blib/lib/Metabrik/System/Virtualbox.pm
Criterion Covered Total %
branch 0 144 0.0


line true false branch
75 0 0 unless $self->brik_help_run_undef_arg('command', $command)
84 0 0 unless my $lines = $self->command('list vms')
97 0 0 unless $self->brik_help_run_undef_arg('register', $vbox)
98 0 0 unless $self->brik_help_run_file_not_found('register', $vbox)
100 0 0 unless ($vbox =~ /\.vbox$/)
112 0 0 unless $self->brik_help_run_undef_arg('start', $name)
113 0 0 unless $self->brik_help_run_undef_arg('start', $type)
115 0 0 if ($self->is_started($name))
132 0 0 unless $self->brik_help_run_undef_arg('stop', $name)
134 0 0 if ($self->is_stopped($name))
145 0 0 unless $self->brik_help_run_undef_arg('save', $name)
154 0 0 unless $self->brik_help_run_undef_arg('pause', $name)
163 0 0 unless $self->brik_help_run_undef_arg('resume', $name)
172 0 0 unless $self->brik_help_run_undef_arg('snapshot_list', $name)
176 0 0 if ($self->log->level > 1)
181 0 0 if ($? != 0)
187 0 0 if ($line =~ /^\s*Name:/)
189 0 0 if (defined $descr and defined $id)
191 0 0 if ($line =~ /\*$/)
212 0 0 unless $self->brik_help_run_undef_arg('snapshot_live', $name)
213 0 0 unless $self->brik_help_run_undef_arg('snapshot_live', $snapshot_name)
217 0 0 if ($self->log->level > 1)
221 0 0 if ($? != 0)
232 0 0 unless $self->brik_help_run_undef_arg('snapshot_delete', $name)
233 0 0 unless $self->brik_help_run_undef_arg('snapshot_delete', $snapshot_name)
238 0 0 if ($? != 0)
249 0 0 unless $self->brik_help_run_undef_arg('snapshot_restore', $name)
250 0 0 unless $self->brik_help_run_undef_arg('snapshot_restore', $snapshot_name)
260 0 0 unless $self->brik_help_run_undef_arg('screenshot', $name)
262 0 0 unless $self->command(qq[controlvm "$name" screenshotpng "$output"])
275 0 0 unless $self->brik_help_run_undef_arg('dumpguestcore', $name)
277 0 0 if (-f $output)
278 0 0 unless my $sf = 'Metabrik::System::File'->new_from_brik_init($self)
279 0 0 unless $sf->remove($output)
282 0 0 unless $self->command(qq[debugvm "$name" dumpguestcore --filename "$output"])
296 0 0 unless $self->brik_help_run_undef_arg('dumpvmcore', $name)
298 0 0 if (-f $output)
299 0 0 unless my $sf = 'Metabrik::System::File'->new_from_brik_init($self)
300 0 0 unless $sf->remove($output)
303 0 0 unless $self->command(qq[debugvm "$name" dumpvmcore --filename "$output"])
317 0 0 unless $self->brik_help_run_undef_arg('extract_memdump_from_dumpguestcore', $input)
319 0 0 unless my $fraw = 'Metabrik::File::Raw'->new_from_brik_init($self)
320 0 0 unless my $fread = 'Metabrik::File::Read'->new_from_brik_init($self)
321 0 0 unless my $felf = 'Metabrik::File::Readelf'->new_from_brik_init($self)
323 0 0 unless my $headers = $felf->program_headers($input)
328 0 0 if ($section->{'type'} eq 'LOAD')
334 0 0 unless ($offset and $size)
341 0 0 unless my $fdin = $fread->open($input)
342 0 0 unless $fread->seek($offset)
344 0 0 if (-f $output)
345 0 0 unless my $sf = 'Metabrik::System::File'->new_from_brik_init($self)
346 0 0 unless $sf->remove($output)
350 0 0 unless my $fdout = $fraw->open($output)
353 0 0 if ($written + $this <= $size) { }
359 0 0 if ($rest < 0)
378 0 0 unless $self->brik_help_run_undef_arg('restart', $name)
380 0 0 unless $self->stop($name)
389 0 0 unless $self->brik_help_run_undef_arg('info', $name)
391 0 0 unless my $lines = $self->command(qq[showvminfo "$name"])
394 0 0 if (@$lines > 0)
399 0 0 unless defined $v
404 0 0 if (length $k and length $v)
420 0 0 unless $self->brik_help_run_undef_arg('is_started', $name)
422 0 0 unless my $info = $self->info($name)
424 0 0 if ($state =~ /running/)
435 0 0 unless $self->brik_help_run_undef_arg('is_stopped', $name)
444 0 0 unless $self->brik_help_run_undef_arg('get_current_snapshot_id', $name)
446 0 0 unless my $list = $self->snapshot_list($name)
449 0 0 if ($this->{'current'})
461 0 0 unless $self->brik_help_run_undef_arg('reset_vboxnet', $device)
463 0 0 unless my $lines1 = $self->command("hostonlyif remove $device")
464 0 0 unless my $lines2 = $self->command('hostonlyif create')