[PATCH 2/4] testbot: Fix Makefile.in additions / removals in GetPatchImpacts().

Francois Gouget fgouget at codeweavers.com
Fri Sep 21 03:35:27 CDT 2018


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/PatchUtils.pm | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 602c80b7d..7c57b2c85 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -183,15 +183,10 @@ sub _HandleFile($$$)
       };
     }
 
-    # Assume makefile modifications may break the build but not the tests
-    if ($File eq "Makefile.in")
+    if ($File eq "Makefile.in" and $Change ne "modify")
     {
-      if ($Change eq "new" or $Change eq "rm")
-      {
-        # This adds / removes a directory
-        $Impacts->{MakeMakefiles} = 1;
-      }
-      return;
+      # This adds / removes a directory
+      $Impacts->{MakeMakefiles} = 1;
     }
 
     if (!$Tests->{$Module}->{Files})
@@ -233,6 +228,11 @@ sub _HandleFile($$$)
       if ($FilePath !~ /^(?:$IgnoredPathsRe)/)
       {
         $Impacts->{WineBuild} = 1;
+        if ($FilePath =~ m~/Makefile.in$~ and $Change ne "modify")
+        {
+          # This adds / removes a directory
+          $Impacts->{MakeMakefiles} = 1;
+        }
       }
       # Else patches to this file don't impact the Wine build.
     }
@@ -358,6 +358,8 @@ sub GetPatchImpacts($;$)
     {
       # Skip unmodified files
       next if (!$TestInfo->{Files}->{$File});
+      # Assume makefile modifications may break the build but not the tests
+      next if ($File eq "Makefile.in");
 
       my $Base = $File;
       if ($Base !~ s/(?:\.c|\.spec)$//)
-- 
2.18.0




More information about the wine-devel mailing list