From: Francois Gouget Subject: [PATCH 2/4] testbot: Fix Makefile.in additions / removals in GetPatchImpacts(). Message-Id: <72a0136fe2cf9f76ae60ccab037bafe40482cd39.1537518914.git.fgouget@codeweavers.com> Date: Fri, 21 Sep 2018 10:35:27 +0200 (CEST) In-Reply-To: <9167ac781d3fc158e51fcdec88a3058b22bfcaa0.1537518914.git.fgouget@codeweavers.com> References: <9167ac781d3fc158e51fcdec88a3058b22bfcaa0.1537518914.git.fgouget@codeweavers.com> Signed-off-by: Francois Gouget --- 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