It is needed by WineRunReconfig.pl.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
I forgot that this function is in another unsubmitted patch. This broke
the build VM update. So I'm updating it to make sure the patches are
tested against the current Wine.
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 8435793615..f1e2c8fcb9 …
[View More]100644
--- a/testbot/lib/WineTestBot/LibvirtDomain.pm
+++ b/testbot/lib/WineTestBot/LibvirtDomain.pm
@@ -176,6 +176,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) = @_;
--
2.19.2
[View Less]
This makes it possible to add all locale VMs with the same SortOrder
value and still have them displayed in a meaningful order.
This also allows them to retain a meaningful order even as locales are
added or removed.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/WineTestBot/VMs.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index 6a08bc1aea..67705474e8 100644
--- a/…
[View More]testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -748,12 +748,14 @@ sub SortKeysBySortOrder($$)
foreach my $Key (@$Keys)
{
my $Item = $self->GetItem($Key);
- $SortOrder{$Key} = [$RoleOrders{$Item->Role} || 0, $Item->SortOrder];
+ $SortOrder{$Key} = [$RoleOrders{$Item->Role} || 0, $Item->SortOrder, $Item->Name];
}
my @SortedKeys = sort {
my ($soa, $sob) = ($SortOrder{$a}, $SortOrder{$b});
- return @$soa[0] <=> @$sob[0] || @$soa[1] <=> @$sob[1];
+ return @$soa[0] <=> @$sob[0] ||
+ @$soa[1] <=> @$sob[1] ||
+ @$soa[2] cmp @$sob[2];
} @$Keys;
return \@SortedKeys;
}
--
2.19.2
[View Less]