The goal was to be able to use it on systems that don't have the winefiles.txt file. However nowadays all systems have access to it. Furthermore the amount of work saved is not really significant so there is no reason for the extra complexity.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/WineRunBuild.pl | 2 +- testbot/lib/Build/Utils.pm | 2 +- testbot/lib/WineTestBot/PatchUtils.pm | 9 +++++---- testbot/lib/WineTestBot/Patches.pm | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index d9bedb533..ec36b629a 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -446,7 +446,7 @@ FatalTAError(undef, $TAError) if (defined $TAError); # Grab the executables for the next steps #
-my $Impacts = GetPatchImpacts($FileName, "nounit"); +my $Impacts = GetPatchImpacts($FileName); my $StepDir = $Step->CreateDir(); foreach my $TestInfo (values %{$Impacts->{Tests}}) { diff --git a/testbot/lib/Build/Utils.pm b/testbot/lib/Build/Utils.pm index 38a801260..2fe7a9778 100644 --- a/testbot/lib/Build/Utils.pm +++ b/testbot/lib/Build/Utils.pm @@ -113,7 +113,7 @@ sub ApplyPatch($$) return undef; }
- my $Impacts = GetPatchImpacts($PatchFile, "nounits"); + my $Impacts = GetPatchImpacts($PatchFile); if ($Impacts->{MakeMakefiles}) { InfoMsg "\nRunning make_makefiles\n"; diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm index 4a1761afb..4ce5bf40c 100644 --- a/testbot/lib/WineTestBot/PatchUtils.pm +++ b/testbot/lib/WineTestBot/PatchUtils.pm @@ -193,7 +193,6 @@ sub _HandleFile($$$) } return; } - return if ($Impacts->{NoUnits});
if (!$Tests->{$Module}->{Files}) { @@ -258,15 +257,17 @@ configure, whether it impacts the tests, etc. =back =cut
-sub GetPatchImpacts($;$$) +sub GetPatchImpacts($;$) { - my ($PatchFileName, $NoUnits, $PastImpacts) = @_; + my ($PatchFileName, $PastImpacts) = @_;
my $fh; return undef if (!open($fh, "<", $PatchFileName));
my $Impacts = { - NoUnits => $NoUnits, + # Number of test units impacted either directly, or indirectly by a module + # patch. + ModuleUnitCount => 0, # Number of patched test units. UnitCount => 0, # The modules that need a rebuild, even if only for the tests. diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm index a052c5a8c..5024ed489 100644 --- a/testbot/lib/WineTestBot/Patches.pm +++ b/testbot/lib/WineTestBot/Patches.pm @@ -134,7 +134,7 @@ sub Submit($$$)
my $PastImpacts; $PastImpacts = GetPatchImpacts($PatchFileName) if ($IsSet); - my $Impacts = GetPatchImpacts("$DataDir/patches/" . $self->Id, undef, $PastImpacts); + my $Impacts = GetPatchImpacts("$DataDir/patches/" . $self->Id, $PastImpacts);
if (!$Impacts->{WineBuild} and !$Impacts->{ModuleBuild} and !$Impacts->{TestBuild})