Francois Gouget : testbot/build: Move GitPull() and call it a bit later in Reconfig.pl.

Alexandre Julliard julliard at winehq.org
Wed Jun 13 14:00:26 CDT 2018


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Jun 13 11:44:12 2018 +0200

testbot/build: Move GitPull() and call it a bit later in Reconfig.pl.

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 977df6e..63fb01b 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))




More information about the wine-cvs mailing list