Commit e82f2948 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé

scripts: don't abort the entire test harness when libvirtd isn't running

It is reasonable to run TCK against a manually started libvirtd, so we
should not abort the entire test suite. Just mark the hook scripts as
skipped.
Reviewed-by: 's avatarLaine Stump <laine@laine.org>
Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
parent 3574b152
......@@ -51,7 +51,7 @@ SKIP: {
log_name => '/tmp/daemon.log');
$hook->libvirtd_status();
BAIL_OUT "libvirtd is not running, Exit..."
skip "libvirtd is not running, Exit...", 12
if ($hook->{libvirtd_status} eq 'stopped');
eval { $hook->prepare(); };
......
......@@ -49,17 +49,21 @@ SKIP: {
skip "NOT using QEMU/LXC driver", 12 unless
$uri eq "qemu:///system" or $uri eq "lxc:///";
my $hook_type = $uri eq "qemu:///system" ? 'qemu' : 'lxc';
my $hook = Sys::Virt::TCK::Hooks->new(type => $hook_type,
conf_dir => '/etc/libvirt/hooks',
expect_result => 0);
$hook->libvirtd_status();
skip "libvirtd is not running, Exit...", 12
if ($hook->{libvirtd_status} eq 'stopped');
my $xml = $tck->generic_domain(name => "tck")->as_xml;
diag "Creating a new persistent domain";
my $dom;
ok_domain(sub { $dom = $conn->define_domain($xml) }, "created persistent domain object");
my $hook_type = $uri eq "qemu:///system" ? 'qemu' : 'lxc';
my $hook = Sys::Virt::TCK::Hooks->new(type => $hook_type,
conf_dir => '/etc/libvirt/hooks',
expect_result => 0);
eval { $hook->prepare(); };
BAIL_OUT "failed to setup hooks testing ENV: $@" if $@;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment