[PATCH] testbot/LibvirtTool: Create a reconfig job for new live Build/Wine VM snapshots.

Francois Gouget fgouget at codeweavers.com
Thu Sep 26 06:36:44 CDT 2019


Only the live snapshots are kept up to date by the TestBot. So Wine
will always be out of date in powered off snapshots making any live
snapshot created from them unusable. The fix is to create a high
priority reconfig job so they are brought up to date before being
used for any other task.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/bin/LibvirtTool.pl | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 37f95e9f1..f6e2d4f60 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -562,6 +562,24 @@ sub Revert()
   {
     $DomainSnapshot .= "-live";
     CreateSnapshot($Domain, $DomainSnapshot);
+
+    if ($VM->Type eq "build" or $VM->Type eq "wine")
+    {
+      require WineTestBot::SpecialJobs;
+      $ErrMessage = WineTestBot::SpecialJobs::AddReconfigJob([$VM], $VM->Name, $VM->Type);
+      if (defined $ErrMessage)
+      {
+        Error("Could not create a job to update and rebuild Wine on the $VMKey VM: $ErrMessage\n");
+        NotifyAdministrator("Could not create a job to update $VMKey",
+          "A live snapshot was created for $VMKey but no job could be\n".
+          "created to update and rebuild Wine on it:\n\n".
+          "$ErrMessage\n");
+      }
+      else
+      {
+        Debug(Elapsed($Start), " Added a job to update and rebuild Wine on $VMKey\n");
+      }
+    }
   }
 
   # Set up the VM locale
-- 
2.20.1




More information about the wine-devel mailing list