Module: tools
Branch: master
Commit: 84ae9f5f5448d38a29f307b9c381cfc3fd8a5793
URL: https://source.winehq.org/git/tools.git/?a=commit;h=84ae9f5f5448d38a29f307b…
Author: Francois Gouget <fgouget(a)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(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)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
Module: tools
Branch: master
Commit: 5141879b5e9bd6423322eb21c57e5e34f5f53e73
URL: https://source.winehq.org/git/tools.git/?a=commit;h=5141879b5e9bd6423322eb2…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Sep 19 12:09:42 2018 +0200
testbot: Remove the HasConfigure patch impact.
Even if the patch provides an updated configure file the TestBot needs
to be able to recreate it in case another patch does not provide it.
Furthermore skipping the autoconf steps correctly is complex when a
patchset changes configure.ac in part 1 and provides configure in part
2, or provides both in part 1 and only some other configure.ac change
in part 2, etc.
So it's better to just run autoconf whenever configure.ac is patched.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/Build/Utils.pm | 2 +-
testbot/lib/WineTestBot/PatchUtils.pm | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/testbot/lib/Build/Utils.pm b/testbot/lib/Build/Utils.pm
index 2fe7a97..2e6cc85 100644
--- a/testbot/lib/Build/Utils.pm
+++ b/testbot/lib/Build/Utils.pm
@@ -125,7 +125,7 @@ sub ApplyPatch($$)
}
}
- if ($Impacts->{Autoconf} && !$Impacts->{HasConfigure})
+ if ($Impacts->{Autoconf})
{
InfoMsg "\nRunning autoconf\n";
system("cd '$DataDir/$Dir' && set -x && autoconf");
diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 4ce5bf4..476757f 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -317,10 +317,6 @@ sub GetPatchImpacts($;$)
{
$Impacts->{WineBuild} = $Impacts->{Autoconf} = 1;
}
- elsif ($Line =~ m=^--- \w+/configure$=)
- {
- $Impacts->{WineBuild} = $Impacts->{HasConfigure} = 1;
- }
elsif ($Line =~ m=^--- \w+/tools/make_makefiles$=)
{
$Impacts->{WineBuild} = $Impacts->{MakeMakefiles} = 1;
Module: tools
Branch: master
Commit: 73d3e48acd0e037bae0c58da5f355bf8061c3259
URL: https://source.winehq.org/git/tools.git/?a=commit;h=73d3e48acd0e037bae0c58d…
Author: Francois Gouget <fgouget(a)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(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)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})