It does not take long and it is actually hard to really know when to rebuild them if taking into account their libs/ and include/ dependencies.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/build/Build.pl | 20 ++++++++------------ testbot/lib/WineTestBot/PatchUtils.pm | 6 +----- 2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl index 5e6b3700c..03733cef6 100755 --- a/testbot/bin/build/Build.pl +++ b/testbot/bin/build/Build.pl @@ -83,7 +83,7 @@ sub ApplyPatch($) if ($? != 0) { LogMsg "Patch failed to apply\n"; - return -1; + return 0; }
my $Impacts = GetPatchImpact($PatchFile, "nounits"); @@ -96,7 +96,7 @@ sub ApplyPatch($) if ($? != 0) { LogMsg "make_makefiles failed\n"; - return -1; + return 0; } }
@@ -109,11 +109,11 @@ sub ApplyPatch($) if ($? != 0) { LogMsg "Autoconf failed\n"; - return -1; + return 0; } }
- return $Impacts->{Tools}; + return 1; }
my $ncpus; @@ -249,21 +249,17 @@ else FatalError "Invalid number of bits $BitIndicators\n"; }
-my $NeedBuildNative = ApplyPatch($PatchFile); -if ($NeedBuildNative < 0) +if (!ApplyPatch($PatchFile)) { exit(1); }
CountCPUs();
-if ($NeedBuildNative) +InfoMsg "Building tools\n"; +if (!BuildNative()) { - InfoMsg "Building tools\n"; - if (!BuildNative()) - { - exit(1); - } + exit(1); }
if ($Run32 && ! BuildTestExecutable($BaseName, $PatchType, 32)) diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm index 2000c9009..6c72e1639 100644 --- a/testbot/lib/WineTestBot/PatchUtils.pm +++ b/testbot/lib/WineTestBot/PatchUtils.pm @@ -142,11 +142,7 @@ sub GetPatchImpact($;$) } elsif ($Line =~ m=^--- \w+/tools/make_makefiles$=) { - $Impacts->{Makefiles} = $Impacts->{Tools} = 1; - } - elsif ($Line =~ m=^--- \w+/tools/(?:makedep.c|make_xftmpl.c|sfnt2fon|winebuild|winegcc|widl|wmc|wrc)$=) - { - $Impacts->{Tools} = 1; + $Impacts->{Makefiles} = 1; } elsif ($Line =~ m=^--- /dev/null$=) {
When a directory is added or removed we must re-run make_makefiles.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/PatchUtils.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm index 6c72e1639..a466df359 100644 --- a/testbot/lib/WineTestBot/PatchUtils.pm +++ b/testbot/lib/WineTestBot/PatchUtils.pm @@ -87,7 +87,16 @@ sub _AddTest($$$) }
# Assume makefile modifications may break the build but not the tests - return if ($File eq "Makefile.in" or $Impacts->{NoUnits}); + if ($File eq "Makefile.in") + { + if ($Change eq "new" or $Change eq "rm") + { + # This adds / removes a directory + $Impacts->{Makefiles} = 1; + } + return; + } + return if ($Impacts->{NoUnits});
if (!$Tests->{$Module}->{Files}) {