Francois Gouget : testbot: Set a flag when all of a module' s test units must be rerun.

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


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

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

testbot: Set a flag when all of a module's test units must be rerun.

This will let GetPatchImpacts() callers make optimisations like passing
the module name to WineTest instead of the full test unit list.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/PatchUtils.pm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 476757f..9e0e689 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -353,7 +353,6 @@ sub GetPatchImpacts($;$)
   foreach my $TestInfo (values %{$Impacts->{Tests}})
   {
     # For each module, identify modifications to non-C files and helper dlls
-    my $AllUnits;
     foreach my $File (keys %{$TestInfo->{Files}})
     {
       # Skip unmodified files
@@ -363,7 +362,7 @@ sub GetPatchImpacts($;$)
       if ($Base !~ s/(?:\.c|\.spec)$//)
       {
         # Any change to a non-C non-Spec file can potentially impact all tests
-        $AllUnits = 1;
+        $TestInfo->{All} = 1;
         last;
       }
       if (exists $TestInfo->{Files}->{"$Base.spec"} and
@@ -371,7 +370,7 @@ sub GetPatchImpacts($;$)
            $TestInfo->{Files}->{"$Base.spec"}))
       {
         # Any change to a helper dll can potentially impact all tests
-        $AllUnits = 1;
+        $TestInfo->{All} = 1;
         last;
       }
     }
@@ -380,7 +379,7 @@ sub GetPatchImpacts($;$)
     foreach my $File (keys %{$TestInfo->{Files}})
     {
       # Skip unmodified files
-      next if (!$AllUnits and !$TestInfo->{Files}->{$File});
+      next if (!$TestInfo->{All} and !$TestInfo->{Files}->{$File});
 
       my $Base = $File;
       # Non-C files are not test units
@@ -388,7 +387,7 @@ sub GetPatchImpacts($;$)
       # Helper dlls are not test units
       next if (exists $TestInfo->{Files}->{"$Base.spec"});
 
-      if (($AllUnits or $TestInfo->{Files}->{$File}) and
+      if (($TestInfo->{All} or $TestInfo->{Files}->{$File}) and
              $TestInfo->{Files}->{$File} ne "rm")
       {
         # Only new/modified test units are impacted




More information about the wine-cvs mailing list