Module: tools
Branch: master
Commit: d5d1c8e2cfb234315b91d488f85dfc79d2614373
URL: https://source.winehq.org/git/tools.git/?a=commit;h=d5d1c8e2cfb234315b91d48…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Apr 14 16:59:13 2022 +0200
testbot/LibvirtTool: Allow using preconfigured non-live snapshots as a base.
Don't use 'test-live' as a base because we cannot assume that rebooting
it will not break its configuration. But do use snapshots such as
'test-adm' as a base. This allows automating the creation of live
snapshots for Windows versions where a given option is not supported.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 41 ++++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index df7859d..a9622de 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -613,27 +613,34 @@ sub PrepareVM($)
}
}
-sub GetSnapshotConfig($)
+sub GetSnapshotConfig($$)
{
- my ($Config) = @_;
-
- # Don't stack snapshots. For instance assume the snapshot name is
- # 'test-live-fr-FR-tsign' and that 'test-live-fr-FR' already exists
- # (typically because it is used by another VM):
- # - It's probably better if snapshots are independent from each other.
- # - Applying the 'tsign' flag on top of the existing snapshot requires a
- # Windows reboot. But format locale changes may not stick across reboots.
- # - Stopping the snapshot name parsing when finding an existing snapshot name
- # would lose the 'live' flag resulting in an error (or the wrong type of
- # snapshot. Avoiding this issue would result in more complexity.
- # - Finally snapshot stacking does not seem that useful.
- # - A consequence is that the base snapshot should be called 'test' and not
- # 'test-live'.
+ my ($Domain, $Config) = @_;
+
+ # Notes:
+ # - Don't use a live snapshot as a base snapshot:
+ # - It's probably better if snapshots are independent from each other.
+ # - Applying extra options on top of a live snapshot may require a reboot.
+ # But some locales changes may not survive that. So using, for instance,
+ # test-fr-FR-live as a base may break the locale.
+ # - However some options are not supported on all Windows versions. For
+ # instance 'adm' snapshots cannot be created on Windows 7 so in that case
+ # it is useful to be able to use a preconfigured test-adm as a base
+ # snapshot for test-adm-live.
+ # - Finally, although base snapshots, such as 'test', are presumably powered
+ # off, 'off' snapshots still create a new snapshot. The difference is that
+ # the 'test-off' snapshot will have an up-to-date TestAgentd server, the
+ # right desktop background, etc.
while (1)
{
+ if ($Config->{base} !~ /-live\b/ and
+ $Domain->HasSnapshot($Config->{base}))
+ {
+ last;
+ }
if ($Config->{base} =~ s/-([a-z]{2}-[A-Z]{2})$//)
{
- $Config->{locale} ||= $1; # take only the last match
+ $Config->{locale} ||= $1; # use the last locale in the snapshot name
}
elsif ($Config->{base} =~ s/-(adm|live|off|tsign|u8)$//)
{
@@ -837,7 +844,7 @@ sub Revert()
if (!$Domain->HasSnapshot($Config->{base}))
{
$Config->{create} = 1;
- GetSnapshotConfig($Config);
+ GetSnapshotConfig($Domain, $Config);
Debug(join(" ", Elapsed($Start), "Config:", map { "$_=$Config->{$_}" } sort keys %$Config), "\n");
if ($Config->{locale} and $VM->Type !~ /^win(?:32|64)$/)
{
Module: tools
Branch: master
Commit: 50be5df45be1798451f58382231906bba853fd9a
URL: https://source.winehq.org/git/tools.git/?a=commit;h=50be5df45be1798451f5838…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Apr 14 16:58:35 2022 +0200
testbot/LibvirtTool: Add a proper usage message.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 33760d3..df7859d 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -141,6 +141,31 @@ if (!defined $Usage)
if (defined $Usage)
{
print "Usage: $Name0 [--debug] [--log-only] [--help] (checkidle|checkoff|monitor|poweroff|revert) VMName\n";
+ print "\n";
+ print "Prepare the VM for use by the TestBot.\n";
+ print "\n";
+ print "Where:\n";
+ print " VMName Is the name of the TestBot VM to work on.\n";
+ print " checkidle Checks that the virtual machine is running the appropriate\n";
+ print " snapshot for the VM and sets the VM status to either idle (if it\n";
+ print " does), off (if it is powered off) or offline (in case of Libvirt\n";
+ print " error).\n";
+ print " checkoff Checks that the virtual machine is powered off and sets the VM's\n";
+ print " status to either off (if it is) or offline (in case of Libvirt\n";
+ print " error).\n";
+ print " monitor Tries accessing the virtual machine through Libvirt until success\n";
+ print " at which time the virtual machine is powered off and the VM\n";
+ print " status is set to off.\n";
+ print " poweroff Powers off the virtual machine and sets the VM status to off.\n";
+ print " revert Reverts and powers on the virtual machine to the snapshot\n";
+ print " specified by the VM. If the snapshot does not exist it may be\n";
+ print " created from an existing base snapshot by applying configuration\n";
+ print " options such as powering on the virtual machine, setting the\n";
+ print " locales, enabling test signing, etc.\n";
+ print " --debug More verbose messages for debugging.\n";
+ print " --log-only Only send error messages to the log instead of also printing them\n";
+ print " on stderr.\n";
+ print " --help Shows this usage message.\n";
exit $Usage;
}
Module: tools
Branch: master
Commit: 1f0e5a654d1e59678d093f81a77d3b281743d210
URL: https://source.winehq.org/git/tools.git/?a=commit;h=1f0e5a654d1e59678d093f8…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Apr 14 16:58:04 2022 +0200
testbot/cgi: Clean up CollectionBlock's property handling.
Delegate generating the inside of a cell to GenerateDataView() such that
GenerateDataCell() only deals with the cell itself.
Remove GetDisplayValue() and GetEscapedDisplayValue(): CollectionBlocks
don't deal with editing so there is no need for access to the 'raw'
data. Thus they are both replaced by GenerateDataView().
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 251 +++++++++++++++----------
testbot/web/JobDetails.pl | 36 ++--
testbot/web/PatchesList.pl | 14 +-
testbot/web/WineTestBot.css | 4 +-
testbot/web/admin/UsersList.pl | 14 +-
testbot/web/index.pl | 58 +++---
6 files changed, 210 insertions(+), 167 deletions(-)
Diff: https://source.winehq.org/git/tools.git/?a=commitdiff;h=1f0e5a654d1e59678d0…