Francois Gouget : testbot/WineRunReconfig: Simplify retrieving the latest reference files.

Alexandre Julliard julliard at winehq.org
Tue Sep 17 11:55:07 CDT 2019


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Sep 17 12:35:41 2019 +0200

testbot/WineRunReconfig: Simplify retrieving the latest reference files.

Both the build and wine VMs produce the native TestLauncher binaries
now.

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

---

 testbot/bin/WineRunReconfig.pl | 31 ++++++++++---------------------
 1 file changed, 10 insertions(+), 21 deletions(-)

diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index ed3dd90..d0baccc 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -40,6 +40,7 @@ sub BEGIN
 my $Name0 = $0;
 $Name0 =~ s+^.*/++;
 
+use File::Basename;
 
 use WineTestBot::Config;
 use WineTestBot::Jobs;
@@ -428,32 +429,20 @@ FatalTAError(undef, $TAError) if (defined $TAError);
 if ($NewStatus eq "completed")
 {
   use File::Copy;
-  if ($VM->Type eq "build")
+  foreach my $FileName ("../src/TestLauncher/TestLauncher32.exe",
+                        "../src/TestLauncher/TestLauncher64.exe",
+                        "latest/winefiles.txt",
+                        "latest/wine-parentsrc.txt")
   {
-    for my $Bitness ("32", "64")
+    my $BaseName = basename($FileName);
+    Debug(Elapsed($Start), " Retrieving '$TaskDir/$BaseName'\n");
+    if ($TA->GetFile($FileName, "$TaskDir/$BaseName"))
     {
-      Debug(Elapsed($Start), " Retrieving the $Bitness bit TestLauncher to '$TaskDir/TestLauncher$Bitness.exe'\n");
-      if ($TA->GetFile("../src/TestLauncher/TestLauncher$Bitness.exe", "$TaskDir/TestLauncher$Bitness.exe"))
-      {
-        copy "$TaskDir/TestLauncher$Bitness.exe", "$DataDir/latest/TestLauncher$Bitness.exe";
-      }
-      elsif (!defined $TAError)
-      {
-        FatalTAError($TA, "An error occurred while retrieving the $Bitness bit TestLauncher");
-      }
-    }
-  }
-
-  foreach my $FileName ("winefiles.txt", "wine-parentsrc.txt")
-  {
-    Debug(Elapsed($Start), " Retrieving '$TaskDir/$FileName'\n");
-    if ($TA->GetFile("latest/$FileName", "$TaskDir/$FileName"))
-    {
-      copy "$TaskDir/$FileName", "$DataDir/latest/$FileName";
+      copy "$TaskDir/$BaseName", "$DataDir/latest/$BaseName";
     }
     elsif (!defined $TAError)
     {
-      FatalTAError($TA, "An error occurred while retrieving '$TaskDir/$FileName'");
+      FatalTAError($TA, "An error occurred while retrieving '$TaskDir/$BaseName'");
     }
   }
 }




More information about the wine-cvs mailing list