[tools] testbot/LogUtils: Add support for IgnoreExceptions.
Francois Gouget
fgouget at codeweavers.com
Thu Mar 4 07:27:30 CST 2021
Any exception occurring while IgnoreExceptions=1 is expected and should
be ignored.
Note that this is made possible by the fact that ParseWineTestReport()
is now the sole authority on what is a report error line, and thus won't
be contradicted by GetReportLineCategory() (which lacks the context
information to deal with IgnoreExceptions directives).
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
This fixes the failure count when running kernel32:debugger. That is
the TestBot will no longer report every kernel32:debugger run as
failed.
---
testbot/lib/WineTestBot/LogUtils.pm | 56 ++++++++++++++++++-----------
1 file changed, 36 insertions(+), 20 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 0bd7d19de..bdba8dad0 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -611,44 +611,60 @@ sub ParseWineTestReport($$$)
_AddReportError($LogInfo, $Cur, $LineNo, $Line);
$Cur->{LineFailures}++;
}
+ elsif (($Cur->{Unit} ne "" and
+ $Line =~ /($Cur->{UnitsRE})\.c:\d+: IgnoreExceptions=([01])/) or
+ $Line =~ /^([_.a-z0-9]+)\.c:\d+: IgnoreExceptions=([01])/)
+ {
+ my ($Unit, $Ignore) = ($1, $2);
+ _CheckUnit($LogInfo, $Cur, $Unit, "ignore exceptions");
+ $Cur->{IgnoreExceptions} = $Ignore;
+ }
elsif (($Cur->{Unit} ne "" and
$Line =~ /([0-9a-f]+):($Cur->{UnitsRE}): unhandled exception [0-9a-fA-F]{8} at /) or
$Line =~ /^([0-9a-f]+):([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at /)
{
my ($Pid, $Unit) = ($1, $2);
-
- if ($Cur->{Units}->{$Unit})
+ _CheckUnit($LogInfo, $Cur, $Unit, "unhandled exception");
+ if (!$Cur->{IgnoreExceptions})
{
- # This also replaces a test summary line.
- $Cur->{Pids}->{$Pid || 0} = 1;
- $Cur->{SummaryFailures}++;
+ if ($Cur->{Units}->{$Unit})
+ {
+ # This also replaces a test summary line.
+ $Cur->{Pids}->{$Pid || 0} = 1;
+ $Cur->{SummaryFailures}++;
+ }
+ _AddReportError($LogInfo, $Cur, $LineNo, $Line);
+ $Cur->{LineFailures}++;
}
- _CheckUnit($LogInfo, $Cur, $Unit, "unhandled exception");
- _AddReportError($LogInfo, $Cur, $LineNo, $Line);
- $Cur->{LineFailures}++;
}
elsif ($Line =~ /Unhandled exception: .* in .* code /)
{
- # This also replaces a test summary line. The pid is unknown so use 0.
- $Cur->{Pids}->{0} = 1;
- $Cur->{SummaryFailures}++;
- _AddReportError($LogInfo, $Cur, $LineNo, $Line);
- $Cur->{LineFailures}++;
+ if (!$Cur->{IgnoreExceptions})
+ {
+ # This also replaces a test summary line. The pid is unknown so use 0.
+ $Cur->{Pids}->{0} = 1;
+ $Cur->{SummaryFailures}++;
+ _AddReportError($LogInfo, $Cur, $LineNo, $Line);
+ $Cur->{LineFailures}++;
+ }
}
elsif (($Cur->{Unit} ne "" and
$Line =~ /($Cur->{UnitsRE})\.c:\d+: unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/) or
$Line =~ /^([_.a-z0-9]+)\.c:\d+: unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/)
{
my ($Unit, $Pid) = ($1, $2);
- if ($Cur->{Units}->{$Unit})
+ _CheckUnit($LogInfo, $Cur, $Unit, "child exception");
+ if (!$Cur->{IgnoreExceptions})
{
- # This also replaces a test summary line.
- $Cur->{Pids}->{$Pid || 0} = 1;
- $Cur->{SummaryFailures}++;
+ if ($Cur->{Units}->{$Unit})
+ {
+ # This also replaces a test summary line.
+ $Cur->{Pids}->{$Pid || 0} = 1;
+ $Cur->{SummaryFailures}++;
+ }
+ _AddReportError($LogInfo, $Cur, $LineNo, $Line);
+ $Cur->{LineFailures}++;
}
- _CheckUnit($LogInfo, $Cur, $Unit, "child exception");
- _AddReportError($LogInfo, $Cur, $LineNo, $Line);
- $Cur->{LineFailures}++;
}
elsif (($Cur->{Unit} ne "" and
$Line =~ /([0-9a-f]+):($Cur->{Unit}): \d+ tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./) or
--
2.20.1
More information about the wine-devel
mailing list