Module: tools
Branch: master
Commit: 82a3c95a36e428b04a2c4142efdee85ae0cc98dc
URL: https://source.winehq.org/git/tools.git/?a=commit;h=82a3c95a36e428b04a2c414…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Sep 24 12:41:35 2018 +0200
testbot: Increase the full rebuild timeouts.
The increased timeouts can be needed if the computer is otherwise busy
(which should not be happening on the official TestBot unless the
administrator is doing some maintenance on the side).
The new timeouts should provide at least a 50% margin, thus also leaving
some room for Wine to grow.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Config.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm
index a83085d..1576177 100644
--- a/testbot/lib/WineTestBot/Config.pm
+++ b/testbot/lib/WineTestBot/Config.pm
@@ -95,13 +95,13 @@ $MaxTaskTries = 3;
# Exe build timeouts (in seconds)
# - For a full build
$ExeBuildNativeTimeout = 60;
-$ExeBuildTestTimeout = 2 * 60;
+$ExeBuildTestTimeout = 4 * 60;
# - For a single module
$ExeModuleTimeout = 30;
# Wine build timeouts (in seconds)
# - For a full build
-$WineBuildTimeout = 20 * 60;
+$WineBuildTimeout = 25 * 60;
# - For a single module
$WineModuleTimeout = 60;
Module: tools
Branch: master
Commit: 09a1b2332d5092ec635108c6c48814707d67d52d
URL: https://source.winehq.org/git/tools.git/?a=commit;h=09a1b2332d5092ec635108c…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Sep 24 12:42:22 2018 +0200
testbot: Fix patchset handling in GetPatchImpacts().
Only the last part must be taken into account to determine if a rebuild
or testing is needed. But they are needed, the previous parts must be
taken into account for the rebuild, including the Autoconf and
MakeMakefile fields.
This also means the scope of the rebuild may be different from that of
the tests (we may need a full rebuild to run a single test). So
introduce RebuildRoot and RebuildModules which are similar to
PatchedRoot and PatchedModules but also take into account patches from
previous parts.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/PatchUtils.pm | 44 ++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 19 deletions(-)
diff --git a/testbot/lib/WineTestBot/PatchUtils.pm b/testbot/lib/WineTestBot/PatchUtils.pm
index 2bac7be..b7307e5 100644
--- a/testbot/lib/WineTestBot/PatchUtils.pm
+++ b/testbot/lib/WineTestBot/PatchUtils.pm
@@ -283,24 +283,12 @@ sub GetPatchImpacts($;$)
if ($PastImpacts)
{
- 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.
- my $WineFiles = $PastImpacts->{WineFiles} || $_WineFiles;
- map { $Impacts->{WineFiles}->{$_} = 1 } keys %{$WineFiles};
- map { $Impacts->{WineFiles}->{$_} = 1 } keys %{$PastImpacts->{NewFiles}};
- map { delete $Impacts->{WineFiles}->{$_} } keys %{$PastImpacts->{DeletedFiles}};
- # Modules impacted by previous parts of a patchset still need to be
- # rebuilt.
- $Impacts->{BuildModules} = { %{$PastImpacts->{BuildModules}} };
- }
- else
- {
- $Impacts->{NewFiles} = $PastImpacts->{NewFiles};
- $Impacts->{DeletedFiles} = $PastImpacts->{DeletedFiles};
- }
+ # Update the list of Wine files so we correctly recognize patchset parts
+ # that modify new Wine files.
+ my $WineFiles = $PastImpacts->{WineFiles} || $_WineFiles;
+ map { $Impacts->{WineFiles}->{$_} = 1 } keys %{$WineFiles};
+ map { $Impacts->{WineFiles}->{$_} = 1 } keys %{$PastImpacts->{NewFiles}};
+ map { delete $Impacts->{WineFiles}->{$_} } keys %{$PastImpacts->{DeletedFiles}};
foreach my $PastInfo (values %{$PastImpacts->{Tests}})
{
@@ -403,6 +391,24 @@ sub GetPatchImpacts($;$)
$Impacts->{TestUnitCount} += $TestInfo->{UnitCount};
}
+ if ($Impacts->{PatchedRoot} or $Impacts->{PatchedModules} or
+ $Impacts->{PatchedTests})
+ {
+ # Any patched area will need to be rebuilt...
+ $Impacts->{RebuildRoot} = $Impacts->{PatchedRoot};
+ $Impacts->{RebuildModules} = $Impacts->{PatchedModules};
+
+ # ... even if the patch was in previous parts
+ if ($PastImpacts)
+ {
+ $Impacts->{Autoconf} ||= $PastImpacts->{Autoconf};
+ $Impacts->{MakeMakefiles} ||= $PastImpacts->{MakeMakefiles};
+ $Impacts->{RebuildRoot} ||= $PastImpacts->{PatchedRoot};
+ $Impacts->{RebuildModules} ||= $PastImpacts->{PatchedModules};
+ map { $Impacts->{BuildModules}->{$_} = 1 } keys %{$PastImpacts->{BuildModules}};
+ }
+ }
+
return $Impacts;
}
@@ -419,7 +425,7 @@ sub GetBuildTimeout($$)
map {$_ =~ /^exe/ ? $ExeCount++ : $WineCount++ } keys %$Builds;
# Set $ModuleCount to 0 if a full rebuild is needed
- my $ModuleCount = (!$Impacts or $Impacts->{PatchedRoot}) ? 0 :
+ my $ModuleCount = (!$Impacts or $Impacts->{RebuildRoot}) ? 0 :
scalar(keys %{$Impacts->{BuildModules}});
my ($ExeTimeout, $WineTimeout) = (0, 0);
Module: tools
Branch: master
Commit: 0d1500d714eee1e50d3639c92a65c8e6c31b21f2
URL: https://source.winehq.org/git/tools.git/?a=commit;h=0d1500d714eee1e50d3639c…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Sep 24 12:43:25 2018 +0200
testbot: Fix the detection and reporting of timed out Wine tests.
Modify ParseWineTestReport() to report the number of test units and
timeouts found in the report and remove the IsSuite parameter.
This allows the caller to check whether the report has the expected
number of test units, and to better decide whether the test as a whole
timed out. The policy is to now only consider it to have timed out if
all the test units timed out, which would typically only happen when
running a single test.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunTask.pl | 6 +++---
testbot/bin/WineRunWineTest.pl | 6 +++---
testbot/lib/WineTestBot/LogUtils.pm | 16 +++++++++-------
3 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 5ff3fc4..077426b 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -523,13 +523,13 @@ if (!defined $TA->Wait($Pid, $Timeout, $Keepalive))
}
}
-my $TimedOut;
Debug(Elapsed($Start), " Retrieving the report file to '$RptFileName'\n");
if ($TA->GetFile($RptFileName, "$TaskDir/$RptFileName"))
{
chmod 0664, "$TaskDir/$RptFileName";
- (my $LogFailures, my $LogErrors, $TimedOut) = ParseWineTestReport("$TaskDir/$RptFileName", $IsWineTest, $Step->Type eq "suite", $TaskTimedOut);
+ my ($TestUnitCount, $TimeoutCount, $LogFailures, $LogErrors) = ParseWineTestReport("$TaskDir/$RptFileName", $IsWineTest, $TaskTimedOut);
+ $TaskTimedOut = 1 if ($TestUnitCount == $TimeoutCount);
if (!defined $LogFailures and @$LogErrors == 1)
{
# Could not open the file
@@ -563,4 +563,4 @@ FatalTAError(undef, $TAError, $PossibleCrash) if (defined $TAError);
# Wrap up
#
-WrapUpAndExit($NewStatus, $TaskFailures, undef, $TaskTimedOut || $TimedOut);
+WrapUpAndExit($NewStatus, $TaskFailures, undef, $TaskTimedOut);
diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl
index e3b8b17..90e3403 100755
--- a/testbot/bin/WineRunWineTest.pl
+++ b/testbot/bin/WineRunWineTest.pl
@@ -534,7 +534,6 @@ elsif (!defined $TAError)
# Grab the test logs if any
#
-my $TimedOut;
if ($Step->Type ne "build")
{
my $BuildList = $Task->CmdLineArg;
@@ -547,7 +546,8 @@ if ($Step->Type ne "build")
{
chmod 0664, "$TaskDir/$RptFileName";
- (my $LogFailures, my $LogErrors, $TimedOut) = ParseWineTestReport("$TaskDir/$RptFileName", 1, $Step->Type eq "suite", $TaskTimedOut);
+ my ($TestUnitCount, $TimeoutCount, $LogFailures, $LogErrors) = ParseWineTestReport("$TaskDir/$RptFileName", 1, $TaskTimedOut);
+ $TaskTimedOut = 1 if ($TestUnitCount == $TimeoutCount);
if (!defined $LogFailures and @$LogErrors == 1)
{
# Could not open the file
@@ -595,4 +595,4 @@ FatalTAError(undef, $TAError, $PossibleCrash) if (defined $TAError);
# Wrap up
#
-WrapUpAndExit($NewStatus, $TaskFailures, undef, $TaskTimedOut || $TimedOut);
+WrapUpAndExit($NewStatus, $TaskFailures, undef, $TaskTimedOut);
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index b0b8040..17d44a4 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -277,23 +277,23 @@ a list of extra errors, and whether the test timed out.
=back
=cut
-sub ParseWineTestReport($$$$)
+sub ParseWineTestReport($$$)
{
- my ($FileName, $IsWineTest, $IsSuite, $TaskTimedOut) = @_;
+ my ($FileName, $IsWineTest, $TaskTimedOut) = @_;
my $LogFile;
if (!open($LogFile, "<", $FileName))
{
my $BaseName = basename($FileName);
- return (undef, ["Unable to open '$BaseName' for reading: $!"], undef);
+ return (undef, undef, undef, ["Unable to open '$BaseName' for reading: $!"]);
}
my $Parser = {
IsWineTest => $IsWineTest,
- IsSuite => $IsSuite,
TaskTimedOut => $TaskTimedOut,
- TimedOut => undef,
+ TestUnitCount => 0,
+ TimeoutCount => 0,
Failures => undef,
Errors => [],
};
@@ -309,6 +309,7 @@ sub ParseWineTestReport($$$$)
# Close the previous test unit
_CloseTestUnit($Parser, $Cur, 0) if ($Cur->{Dll} ne "");
$Cur = _NewCurrentUnit($Dll, $Unit);
+ $Parser->{TestUnitCount}++;
# Recognize skipped messages in case we need to skip tests in the VMs
$Cur->{Rc} = 0 if ($Type eq "skipped");
@@ -414,7 +415,7 @@ sub ParseWineTestReport($$$$)
# so record the failure but don't add an error message.
$Parser->{Failures}++;
$Cur->{IsBroken} = 1;
- $Parser->{TimedOut} = $Parser->{IsSuite};
+ $Parser->{TimeoutCount}++;
}
elsif ((!$Pid and !%{$Cur->{Pids}}) or
($Pid and !$Cur->{Pids}->{$Pid} and !$Cur->{Pids}->{0}))
@@ -445,7 +446,8 @@ sub ParseWineTestReport($$$$)
_CloseTestUnit($Parser, $Cur, 1);
close($LogFile);
- return ($Parser->{Failures}, $Parser->{Errors}, $Parser->{TimedOut});
+ return ($Parser->{TestUnitCount}, $Parser->{TimeoutCount},
+ $Parser->{Failures}, $Parser->{Errors});
}