Module: tools
Branch: master
Commit: f4c3c990f09bd918e2c193d4bf46dd5b49d96cf5
URL: https://source.winehq.org/git/tools.git/?a=commit;h=f4c3c990f09bd918e2c193d…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Sep 21 10:35:34 2018 +0200
testbot: Rename some GetPatchImpacts() fields.
The new names are less ambiguous and less Wine-specific.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/build/Build.pl | 2 +-
testbot/lib/WineTestBot/PatchUtils.pm | 25 ++++++++++++-------------
testbot/lib/WineTestBot/Patches.pm | 6 +++---
testbot/web/Submit.pl | 4 ++--
4 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/testbot/bin/build/Build.pl b/testbot/bin/build/Build.pl
index 7a268db..1287f6d 100755
--- a/testbot/bin/build/Build.pl
+++ b/testbot/bin/build/Build.pl
@@ -222,7 +222,7 @@ if ($DataDir =~ /'/)
my $Impacts = ApplyPatch("wine", $PatchFile);
if (!$Impacts or
- ($Impacts->{WineBuild} and !BuildNative()) or
+ ($Impacts->{PatchedRoot} and !BuildNative()) or
!BuildTestExecutables($Targets, $Impacts, "exe32") or
!BuildTestExecutables($Targets, $Impacts, "exe64"))
{
diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 04aea18..2bac7be 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -195,7 +195,7 @@ sub _HandleFile($$$)
my ($Root, $Dir, $File) = ($1, $2, $3);
my $Module = _CreateTestInfo($Impacts, $Root, $Dir);
- $Impacts->{TestBuild} = 1;
+ $Impacts->{PatchedTests} = 1;
$Impacts->{Tests}->{$Module}->{Files}->{$File} = $Change;
if ($File eq "Makefile.in" and $Change ne "modify")
@@ -209,7 +209,7 @@ sub _HandleFile($$$)
my ($Root, $Dir, $File) = ($1, $2, $3);
my $Module = _CreateTestInfo($Impacts, $Root, $Dir);
- $Impacts->{ModuleBuild} = 1;
+ $Impacts->{PatchedModules} = 1;
if ($File eq "Makefile.in" and $Change ne "modify")
{
@@ -227,12 +227,11 @@ sub _HandleFile($$$)
$Impacts->{IsWinePatch} = 1;
}
# Else this file exists in Wine but has a very common name so it may just
- # as well belong to another repository. Still update WineBuild in case
- # this patch really is for Wine.
+ # as well belong to another repository.
if ($FilePath !~ /^(?:$IgnoredPathsRe)/)
{
- $Impacts->{WineBuild} = 1;
+ $Impacts->{PatchedRoot} = 1;
if ($FilePath =~ m~/Makefile.in$~ and $Change ne "modify")
{
# This adds / removes a directory
@@ -245,7 +244,7 @@ sub _HandleFile($$$)
{
# This may or may not be a Wine patch but the new Makefile.in will be
# added to the build by make_makefiles.
- $Impacts->{WineBuild} = $Impacts->{MakeMakefiles} = 1;
+ $Impacts->{PatchedRoot} = $Impacts->{MakeMakefiles} = 1;
}
}
}
@@ -274,7 +273,7 @@ sub GetPatchImpacts($;$)
# patch.
ModuleUnitCount => 0,
# Number of patched test units.
- UnitCount => 0,
+ TestUnitCount => 0,
# The modules that need a rebuild, even if only for the tests.
BuildModules => {},
# Information about 'tests' directories.
@@ -284,8 +283,8 @@ sub GetPatchImpacts($;$)
if ($PastImpacts)
{
- if ($PastImpacts->{WineBuild} or $PastImpacts->{ModuleBuild} or
- $PastImpacts->{TestBuild})
+ if ($PastImpacts->{PatchedRoot} or $PastImpacts->{PatchedModules} or
+ $PastImpacts->{PatchedTests})
{
# Update the list of Wine files so we correctly recognize patchset parts
# that modify new Wine files.
@@ -318,11 +317,11 @@ sub GetPatchImpacts($;$)
{
if ($Line =~ m=^--- \w+/(?:aclocal\.m4|configure\.ac)$=)
{
- $Impacts->{WineBuild} = $Impacts->{Autoconf} = 1;
+ $Impacts->{PatchedRoot} = $Impacts->{Autoconf} = 1;
}
elsif ($Line =~ m=^--- \w+/tools/make_makefiles$=)
{
- $Impacts->{WineBuild} = $Impacts->{MakeMakefiles} = 1;
+ $Impacts->{PatchedRoot} = $Impacts->{MakeMakefiles} = 1;
$Impacts->{IsWinePatch} = 1;
}
elsif ($Line =~ m=^--- /dev/null$=)
@@ -401,7 +400,7 @@ sub GetPatchImpacts($;$)
}
$TestInfo->{UnitCount} = scalar(keys %{$TestInfo->{Units}});
- $Impacts->{UnitCount} += $TestInfo->{UnitCount};
+ $Impacts->{TestUnitCount} += $TestInfo->{UnitCount};
}
return $Impacts;
@@ -420,7 +419,7 @@ sub GetBuildTimeout($$)
map {$_ =~ /^exe/ ? $ExeCount++ : $WineCount++ } keys %$Builds;
# Set $ModuleCount to 0 if a full rebuild is needed
- my $ModuleCount = (!$Impacts or $Impacts->{WineBuild}) ? 0 :
+ my $ModuleCount = (!$Impacts or $Impacts->{PatchedRoot}) ? 0 :
scalar(keys %{$Impacts->{BuildModules}});
my ($ExeTimeout, $WineTimeout) = (0, 0);
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm
index 5024ed4..0387543 100644
--- a/testbot/lib/WineTestBot/Patches.pm
+++ b/testbot/lib/WineTestBot/Patches.pm
@@ -136,8 +136,8 @@ sub Submit($$$)
$PastImpacts = GetPatchImpacts($PatchFileName) if ($IsSet);
my $Impacts = GetPatchImpacts("$DataDir/patches/" . $self->Id, $PastImpacts);
- if (!$Impacts->{WineBuild} and !$Impacts->{ModuleBuild} and
- !$Impacts->{TestBuild})
+ if (!$Impacts->{PatchedRoot} and !$Impacts->{PatchedModules} and
+ !$Impacts->{PatchedTests})
{
if ($Impacts->{IsWinePatch})
{
@@ -176,7 +176,7 @@ sub Submit($$$)
my $BuildVMs = CreateVMs();
$BuildVMs->AddFilter("Type", ["build"]);
$BuildVMs->AddFilter("Role", ["base"]);
- if ($Impacts->{UnitCount} and !$BuildVMs->IsEmpty())
+ if ($Impacts->{TestUnitCount} and !$BuildVMs->IsEmpty())
{
# Create the Build Step
my $BuildStep = $NewJob->Steps->Add();
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index fe10104..ae4aca3 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -598,11 +598,11 @@ sub DetermineFileType($$)
if ($FileType eq "unknown")
{
my $Impacts = GetPatchImpacts($FileName);
- if ($Impacts->{UnitCount} == 0)
+ if ($Impacts->{TestUnitCount} == 0)
{
$ErrMessage = "Patch doesn't affect tests";
}
- elsif ($Impacts->{UnitCount} > 1)
+ elsif ($Impacts->{TestUnitCount} > 1)
{
$ErrMessage = "Patch contains changes to multiple tests";
}
Module: tools
Branch: master
Commit: fa8080c7e9f3013d26ab6f1c26f7fe03488df840
URL: https://source.winehq.org/git/tools.git/?a=commit;h=fa8080c7e9f3013d26ab6f1…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Sep 21 10:35:22 2018 +0200
testbot: Add a ModuleBuild check in GetPatchImpacts().
Patches that impact a single module can impact the Wine files list too.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/PatchUtils.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 9e0e689..602c80b 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -279,7 +279,8 @@ sub GetPatchImpacts($;$)
if ($PastImpacts)
{
- if ($PastImpacts->{WineBuild} or $PastImpacts->{TestBuild})
+ if ($PastImpacts->{WineBuild} or $PastImpacts->{ModuleBuild} or
+ $PastImpacts->{TestBuild})
{
# Update the list of Wine files so we correctly recognize patchset parts
# that modify new Wine files.