To not exceed the maximum report size, each test unit must print less than 2.5KB of traces on average. So report tests that hog more than 10 times that.
Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
This matches the recent test.winehq.org patch.
testbot/bin/WineRunTask.pl | 8 ++++++++ testbot/lib/WineTestBot/Config.pm | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 65faf7251..46b11f396 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -511,6 +511,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName)) # track of the current one. Note that for the TestBot we don't count or # complain about misplaced skips. my ($CurrentDll, $CurrentUnit) = ("", ""); + my $UnitSize = 0; my ($LineFailures, $LineTodos, $LineSkips) = (0, 0, 0); my ($SummaryFailures, $SummaryTodos, $SummarySkips) = (0, 0, 0); my ($CurrentIsBroken, %CurrentPids, $CurrentRc, $LogFailures); @@ -564,6 +565,11 @@ if ($TA->GetFile($RptFileName, $FullLogFileName)) # so only use them as a fallback. $LineFailures ||= $SummaryFailures;
+ if ($UnitSize > $MaxUnitSize) + { + LogTaskError("$CurrentDll:$CurrentUnit prints too much data ($UnitSize bytes)\n"); + $LogFailures++; + } if (!$CurrentIsBroken and defined $CurrentRc) { # Check the exit code, particularly against failures reported @@ -601,6 +607,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName)) $LogFailures += $LineFailures;
$CurrentDll = $CurrentUnit = ""; + $UnitSize = 0; $LineFailures = $LineTodos = $LineSkips = 0; $SummaryFailures = $SummaryTodos = $SummarySkips = 0; $CurrentIsBroken = 0; @@ -610,6 +617,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
foreach my $Line (<$LogFile>) { + $UnitSize += length($Line); if ($Line =~ m%^([_.a-z0-9-]+):([_a-z0-9]*) (start|skipped) (?:-|[/_.a-z0-9]+) (?:-|[.0-9a-f]+)\r?$%) { my ($Dll, $Unit, $Type) = ($1, $2, $3); diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm index 02c9dac37..9052fc4d0 100644 --- a/testbot/lib/WineTestBot/Config.pm +++ b/testbot/lib/WineTestBot/Config.pm @@ -32,7 +32,7 @@ use vars qw (@ISA @EXPORT @EXPORT_OK $UseSSL $LogDir $DataDir $BinDir $SleepAfterRevert $WaitForToolsInVM $MaxTaskTries $AdminEMail $RobotEMail $WinePatchToOverride $WinePatchCc $SuiteTimeout $SingleTimeout - $BuildTimeout $ReconfigTimeout $TagPrefix + $BuildTimeout $ReconfigTimeout $TagPrefix $MaxUnitSize $ProjectName $PatchesMailingList $LDAPServer $LDAPBindDN $LDAPSearchBase $LDAPSearchFilter $LDAPRealNameAttribute $LDAPEMailAttribute $AgentPort $Tunnel @@ -47,7 +47,7 @@ require Exporter; $MaxTaskTries $AdminEMail $RobotEMail $WinePatchToOverride $WinePatchCc $SuiteTimeout $SingleTimeout $BuildTimeout $ReconfigTimeout - $TagPrefix $ProjectName $PatchesMailingList + $TagPrefix $MaxUnitSize $ProjectName $PatchesMailingList $LDAPServer $LDAPBindDN $LDAPSearchBase $LDAPSearchFilter $LDAPRealNameAttribute $LDAPEMailAttribute $AgentPort $Tunnel $TunnelDefaults $PrettyHostNames $JobPurgeDays $JobArchiveDays @@ -96,6 +96,8 @@ $BuildTimeout = 5 * 60; # How long to let a full recompilation run before forcibly shutting it down # (in seconds). $ReconfigTimeout = 45 * 60; +# Maximum amount of traces for a test unit. +$MaxUnitSize = 32 * 1024;
$ProjectName = "Wine"; $PatchesMailingList = "wine-devel";