Francois Gouget : testbot/LibvirtTool: Reduce the Windows boot delay on live snapshots.

Alexandre Julliard julliard at winehq.org
Mon Feb 21 15:58:38 CST 2022


Module: tools
Branch: master
Commit: bc0a6f5c1db047a18b35eec53fdd854624bd5951
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=bc0a6f5c1db047a18b35eec53fdd854624bd5951

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Feb 21 18:33:12 2022 +0100

testbot/LibvirtTool: Reduce the Windows boot delay on live snapshots.

Reducing the boot delay helps ensure there will be enough time for
Windows to complete the reboot before the task times out, which may
allow the TestBot to retrieve the report/logs/diagnostic information.
Note that on 64-bit Windows this requires a 64-bit TestAgentd in order
to be able to run bcdedit.exe.
Also this only works on recent versions of Windows which is okay since a
failure to change the boot delay will not prevent the tests from
running.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/bin/LibvirtTool.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 00d1ce4..ef662cd 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -651,6 +651,15 @@ sub CreateSnapshot($$$$)
     {
       FatalError("Could not reset the $VMKey Windows desktop background color\n");
     }
+
+    # Reduce the boot delay. The way to do this depends on the Windows
+    # version so this only works on recent ones :-(
+    my $PTA = GetPrivilegedTA($TA);
+    if (RunAndWait($PTA, ["bcdedit.exe", "/set", "{bootmgr}", "timeout", "1"]))
+    {
+      Error("Could not change the Windows boot delay on $VMKey\n");
+    }
+
     $Reboot = 1;
   }
 




More information about the wine-cvs mailing list