Module: tools Branch: master Commit: 99ec8b34977592ecd86b7e0b97d3118cafefe18e URL: https://source.winehq.org/git/tools.git/?a=commit;h=99ec8b34977592ecd86b7e0b...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Dec 11 01:39:20 2018 +0100
testbot: Add LibvirtDomain::HasSnapshot().
It is needed by WineRunReconfig.pl.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/lib/WineTestBot/LibvirtDomain.pm | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/testbot/lib/WineTestBot/LibvirtDomain.pm b/testbot/lib/WineTestBot/LibvirtDomain.pm index bab5d7e..89b31e5 100644 --- a/testbot/lib/WineTestBot/LibvirtDomain.pm +++ b/testbot/lib/WineTestBot/LibvirtDomain.pm @@ -174,6 +174,14 @@ sub _GetSnapshot($$) return (_eval_err() || "Snapshot '$SnapshotName' not found", undef, undef); }
+sub HasSnapshot($$) +{ + my ($self, $SnapshotName) = @_; + + my ($ErrMessage, $Domain, $Snapshot) = $self->_GetSnapshot($SnapshotName); + return $ErrMessage ? 0 : 1; +} + sub GetSnapshotName($) { my ($self) = @_;