Nowadays the tests themselves always put the pid on the unhandled exception and test summary lines. And both WineTest and TestLauncher always put it on the done lines.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/LogUtils.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 99b1568e1..5e5af0e2c 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -414,9 +414,9 @@ sub ParseWineTestReport($$$)
$Cur->{LineFailures}++; } - elsif ($Line =~ /^(?:([0-9a-f]+):)?([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at / or + elsif ($Line =~ /^([0-9a-f]+):([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at / or ($Cur->{Unit} ne "" and - $Line =~ /(?:([0-9a-f]+):)?($Cur->{UnitsRE}): unhandled exception [0-9a-fA-F]{8} at /)) + $Line =~ /([0-9a-f]+):($Cur->{UnitsRE}): unhandled exception [0-9a-fA-F]{8} at /)) { my ($Pid, $Unit) = ($1, $2);
@@ -429,9 +429,9 @@ sub ParseWineTestReport($$$) _CheckUnit($Parser, $Cur, $Unit, "unhandled exception"); $Cur->{LineFailures}++; } - elsif ($Line =~ /^(?:([0-9a-f]+):)?([_a-z0-9]+): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./ or + elsif ($Line =~ /^([0-9a-f]+):([_a-z0-9]+): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./ or ($Cur->{Unit} ne "" and - $Line =~ /(?:([0-9a-f]+):)?($Cur->{Unit}): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./)) + $Line =~ /([0-9a-f]+):($Cur->{Unit}): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./)) { my ($Pid, $Unit, $Todos, $Failures, $Skips) = ($1, $2, $3, $4, $5);
@@ -451,9 +451,9 @@ sub ParseWineTestReport($$$) _CheckUnit($Parser, $Cur, $Unit, "test summary") if ($Todos or $Failures); } } - elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*)(?::([0-9a-f]+))? done ((-?\d+))(?:\r?$| in)/ or + elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/ or ($Cur->{Dll} ne "" and - $Line =~ /(\Q$Cur->{Dll}\E):([_a-z0-9]*)(?::([0-9a-f]+))? done ((-?\d+))(?:\r?$| in)/)) + $Line =~ /(\Q$Cur->{Dll}\E):([_a-z0-9]*):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/)) { my ($Dll, $Unit, $Pid, $Rc) = ($1, $2, $3, $4);
@@ -766,7 +766,7 @@ sub GetLogErrors($)
next if ($GetCategory->($Line) !~ /error/);
- if ($Line =~ m/^[^:]+:([^:]*)(?::[0-9a-f]+)? done (258)/) + if ($Line =~ m/^[^:]+:([^:]*):[0-9a-f]+ done (258)/) { my $Unit = $1; $Line = $Unit ne "" ? "$Unit: Timeout" : "Timeout";
The garbage may look like it is part of the dll or unit name, for instance 09d4comdlg32 or dd3d10core. So preferentially match lines using the current dll or unit name and only use regular matches to detect misplaced lines.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/LogUtils.pm | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 5e5af0e2c..282906e62 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -379,23 +379,23 @@ sub ParseWineTestReport($$$) _AddError($Parser, "Misplaced $SubUnit subtest\n"); } } - elsif ($Line =~ /^([_a-z0-9]+).c:\d+: Test (?:failed|succeeded inside todo block): / or - ($Cur->{Unit} ne "" and - $Line =~ /($Cur->{UnitsRE}).c:\d+: Test (?:failed|succeeded inside todo block): /)) + elsif (($Cur->{Unit} ne "" and + $Line =~ /($Cur->{UnitsRE}).c:\d+: Test (?:failed|succeeded inside todo block): /) or + $Line =~ /^([_a-z0-9]+).c:\d+: Test (?:failed|succeeded inside todo block): /) { _CheckUnit($Parser, $Cur, $1, "failure"); $Cur->{LineFailures}++; } - elsif ($Line =~ /^([_a-z0-9]+).c:\d+: Test marked todo: / or - ($Cur->{Unit} ne "" and - $Line =~ /($Cur->{UnitsRE}).c:\d+: Test marked todo: /)) + elsif (($Cur->{Unit} ne "" and + $Line =~ /($Cur->{UnitsRE}).c:\d+: Test marked todo: /) or + $Line =~ /^([_a-z0-9]+).c:\d+: Test marked todo: /) { _CheckUnit($Parser, $Cur, $1, "todo"); $Cur->{LineTodos}++; } - elsif ($Line =~ /^([_a-z0-9]+).c:\d+: Tests skipped: / or - ($Cur->{Unit} ne "" and - $Line =~ /($Cur->{UnitsRE}).c:\d+: Tests skipped: /)) + elsif (($Cur->{Unit} ne "" and + $Line =~ /($Cur->{UnitsRE}).c:\d+: Tests skipped: /) or + $Line =~ /^([_a-z0-9]+).c:\d+: Tests skipped: /) { my $Unit = $1; # Don't complain and don't count misplaced skips. Only complain if they @@ -414,9 +414,9 @@ sub ParseWineTestReport($$$)
$Cur->{LineFailures}++; } - elsif ($Line =~ /^([0-9a-f]+):([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at / or - ($Cur->{Unit} ne "" and - $Line =~ /([0-9a-f]+):($Cur->{UnitsRE}): unhandled exception [0-9a-fA-F]{8} at /)) + 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);
@@ -429,9 +429,9 @@ sub ParseWineTestReport($$$) _CheckUnit($Parser, $Cur, $Unit, "unhandled exception"); $Cur->{LineFailures}++; } - elsif ($Line =~ /^([0-9a-f]+):([_a-z0-9]+): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./ or - ($Cur->{Unit} ne "" and - $Line =~ /([0-9a-f]+):($Cur->{Unit}): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./)) + elsif (($Cur->{Unit} ne "" and + $Line =~ /([0-9a-f]+):($Cur->{Unit}): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./) or + $Line =~ /^([0-9a-f]+):([_a-z0-9]+): \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./) { my ($Pid, $Unit, $Todos, $Failures, $Skips) = ($1, $2, $3, $4, $5);
@@ -451,9 +451,9 @@ sub ParseWineTestReport($$$) _CheckUnit($Parser, $Cur, $Unit, "test summary") if ($Todos or $Failures); } } - elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/ or - ($Cur->{Dll} ne "" and - $Line =~ /(\Q$Cur->{Dll}\E):([_a-z0-9]*):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/)) + elsif (($Cur->{Dll} ne "" and + $Line =~ /(\Q$Cur->{Dll}\E):([_a-z0-9]*):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/) or + $Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/) { my ($Dll, $Unit, $Pid, $Rc) = ($1, $2, $3, $4);