Francois Gouget : testbot: Remove the $NoUnits GetPatchImpacts() parameter.

Alexandre Julliard julliard at winehq.org
Wed Sep 19 16:25:33 CDT 2018


Module: tools
Branch: master
Commit: 73d3e48acd0e037bae0c58da5f355bf8061c3259
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=73d3e48acd0e037bae0c58da5f355bf8061c3259

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Sep 19 12:09:38 2018 +0200

testbot: Remove the $NoUnits GetPatchImpacts() parameter.

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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 d9bedb5..ec36b62 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 38a8012..2fe7a97 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 4a1761a..4ce5bf4 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 a052c5a..5024ed4 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})




More information about the wine-cvs mailing list