[PATCH 1/3] testbot/build: Move GitPull() and call it a bit later in Reconfig.pl.

Francois Gouget fgouget at codeweavers.com
Wed Jun 13 04:44:12 CDT 2018


The functions are now declared in the order in which they are called.
Reconfig.pl now builds the TestBot tools and only then grabs the latest
Wine and recompiles it.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/bin/build/Reconfig.pl | 64 +++++++++++++++++------------------
 1 file changed, 31 insertions(+), 33 deletions(-)

diff --git a/testbot/bin/build/Reconfig.pl b/testbot/bin/build/Reconfig.pl
index 977df6e12..bc179951d 100755
--- a/testbot/bin/build/Reconfig.pl
+++ b/testbot/bin/build/Reconfig.pl
@@ -6,6 +6,7 @@
 # 32 and 64 bit winetest binaries.
 #
 # Copyright 2009 Ge van Geldorp
+# Copyright 2012-2014, 2017-2018 Francois Gouget
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -70,35 +71,6 @@ sub FatalError(@)
   exit 1;
 }
 
-sub GitPull()
-{
-  InfoMsg "Updating the Wine source\n";
-  system("cd $DataDir/wine && git pull >> $LogDir/Reconfig.log 2>&1");
-  if ($? != 0)
-  {
-    LogMsg "Git pull failed\n";
-    return !1;
-  }
-
-  if (open(my $fh, ">", "$DataDir/testlist.txt"))
-  {
-    foreach my $TestFile (glob("$DataDir/wine/*/*/tests/*.c"),
-                          glob("$DataDir/wine/*/*/tests/*.spec"))
-    {
-      next if ($TestFile =~ m=/testlist\.c$=);
-      $TestFile =~ s=^$DataDir/wine/==;
-      print $fh "$TestFile\n";
-    }
-    close($fh);
-  }
-  else
-  {
-    LogMsg "Could not open 'testlist.txt' for writing: $!\n";
-  }
-
-  return 1;
-}
-
 my $ncpus;
 sub CountCPUs()
 {
@@ -156,6 +128,35 @@ sub BuildTestLauncher()
   return 1;
 }
 
+sub GitPull()
+{
+  InfoMsg "Updating the Wine source\n";
+  system("cd $DataDir/wine && git pull >> $LogDir/Reconfig.log 2>&1");
+  if ($? != 0)
+  {
+    LogMsg "Git pull failed\n";
+    return !1;
+  }
+
+  if (open(my $fh, ">", "$DataDir/testlist.txt"))
+  {
+    foreach my $TestFile (glob("$DataDir/wine/*/*/tests/*.c"),
+                          glob("$DataDir/wine/*/*/tests/*.spec"))
+    {
+      next if ($TestFile =~ m=/testlist\.c$=);
+      $TestFile =~ s=^$DataDir/wine/==;
+      print $fh "$TestFile\n";
+    }
+    close($fh);
+  }
+  else
+  {
+    LogMsg "Could not open 'testlist.txt' for writing: $!\n";
+  }
+
+  return 1;
+}
+
 sub BuildNative()
 {
   mkdir "$DataDir/build-native" if (! -d "$DataDir/build-native");
@@ -211,15 +212,12 @@ if (! -d "$DataDir/staging" and ! mkdir "$DataDir/staging")
     LogMsg "Unable to create '$DataDir/staging': $!\n";
     exit(1);
 }
-if (! GitPull())
-{
-  exit(1);
-}
 
 CountCPUs();
 
 if (!BuildTestAgentd() ||
     !BuildTestLauncher() ||
+    !GitPull() ||
     !BuildNative() ||
     !BuildCross(32) ||
     !BuildCross(64))
-- 
2.17.1




More information about the wine-devel mailing list