Zebediah Figura : testbot: Run make_makefiles when a file is added or removed.

Alexandre Julliard julliard at winehq.org
Wed Dec 13 14:30:39 CST 2017


Module: tools
Branch: master
Commit: 6ab34c18e8b916323ec08fdfd1d1a24491ba3368
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=6ab34c18e8b916323ec08fdfd1d1a24491ba3368

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Dec  6 20:45:19 2017 -0600

testbot: Run make_makefiles when a file is added or removed.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/bin/build/Build.pl | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl
index 051039f..82cd66a 100755
--- a/testbot/bin/build/Build.pl
+++ b/testbot/bin/build/Build.pl
@@ -74,6 +74,7 @@ sub ApplyPatch($$$)
 {
   my ($PatchFile, $PatchType, $BaseName) = @_;
 
+  my $NeedMakeMakefiles = !1;
   my $NeedMakefile = 0;
   my $NeedMakeInclude = !1;
   my $NeedBuildDeps = !1;
@@ -84,7 +85,7 @@ sub ApplyPatch($$$)
   {
     my $Line;
     while (defined($Line = <FH>) &&
-           ($NeedMakefile == 0 || ! $NeedMakeInclude || ! $NeedBuildDeps ||
+           (! $NeedMakeMakefiles || $NeedMakefile == 0 || ! $NeedMakeInclude || ! $NeedBuildDeps ||
             ! $NeedImplib || ! $NeedAutoconf || ! $NeedConfigure))
     {
       if ($Line =~ m=^diff.*(?:tests/Makefile\.in|Make\.vars\.in|Make\.rules\.in|Maketest\.rules\.in)$=)
@@ -111,13 +112,19 @@ sub ApplyPatch($$$)
       {
         $NeedConfigure = 1;
       }
+      elsif ($Line =~ m=^new file= || $Line =~ m=^deleted file= || $Line =~ m=^rename= ||
+             $Line =~ m=diff.*tools/make_makefiles=)
+      {
+        $NeedMakeMakefiles = $NeedConfigure = 1;
+      }
     }
     close FH;
   }
 
   InfoMsg "Applying patch\n";
   system("( cd $DataDir/wine && set -x && " .
-         "  git apply --verbose $PatchFile " .
+         "  git apply --verbose $PatchFile && " .
+         "  git add -A " .
          ") >> $LogDir/Build.log 2>&1");
   if ($? != 0)
   {
@@ -125,6 +132,19 @@ sub ApplyPatch($$$)
     return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure);
   }
 
+  if ($NeedMakeMakefiles)
+  {
+    InfoMsg "Running make_makefiles\n";
+    system("( cd $DataDir/wine && set -x && " .
+           " ./tools/make_makefiles " .
+           ") >> $LogDir/Build.log 2>&1");
+    if ($? != 0)
+    {
+      LogMsg "make_makefiles failed\n";
+      return (-1, $NeedMakeInclude, $NeedBuildDeps, $NeedImplib, $NeedConfigure);
+    }
+  }
+
   if ($NeedAutoconf && ! $NeedConfigure)
   {
     InfoMsg "Running autoconf\n";




More information about the wine-cvs mailing list