mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-05 22:36:37 +00:00
test: print more info when OVF parsing fails
When one of the ovf tests fails to parse at all, we just get the 'die' message of the failing component, but not which file actually failed to parse. To get better output, convert the parsing also to a test and ok() and fail() respectively and then printing the error. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
4fb85adc65
commit
31bf5a0f2b
@ -12,8 +12,22 @@ use Data::Dumper;
|
|||||||
|
|
||||||
my $test_manifests = join ('/', $Bin, 'ovf_manifests');
|
my $test_manifests = join ('/', $Bin, 'ovf_manifests');
|
||||||
|
|
||||||
my $win2008 = PVE::QemuServer::OVF::parse_ovf("$test_manifests/Win_2008_R2_two-disks.ovf");
|
print "parsing ovfs\n";
|
||||||
my $win10 = PVE::QemuServer::OVF::parse_ovf("$test_manifests/Win10-Liz.ovf");
|
|
||||||
|
my $win2008 = eval { PVE::QemuServer::OVF::parse_ovf("$test_manifests/Win_2008_R2_two-disks.ovf") };
|
||||||
|
if (my $err = $@) {
|
||||||
|
fail('parse win2008');
|
||||||
|
warn("error: $err\n");
|
||||||
|
} else {
|
||||||
|
ok('parse win2008');
|
||||||
|
}
|
||||||
|
my $win10 = eval { PVE::QemuServer::OVF::parse_ovf("$test_manifests/Win10-Liz.ovf") };
|
||||||
|
if (my $err = $@) {
|
||||||
|
fail('parse win10');
|
||||||
|
warn("error: $err\n");
|
||||||
|
} else {
|
||||||
|
ok('parse win10');
|
||||||
|
}
|
||||||
|
|
||||||
print "testing disks\n";
|
print "testing disks\n";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user