Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/LogUtils.pm | 47 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index ed5dd74d4..e93eac01b 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -314,14 +314,14 @@ sub GetReportLineCategory($) { my ($Line) = @_;
- if ($Line =~ /: Test marked todo: /) + if ($Line =~ /:[0-9]* Test marked todo: /) { return "todo"; } - if ($Line =~ /: Tests skipped: / or + if ($Line =~ /:[0-9.]* Tests skipped: / or $Line =~ /^[_.a-z0-9-]+:[_a-z0-9]* skipped / or - $Line =~ /^[_.a-z0-9-]+:\d+: Line has been silenced after \d+ occurrences$/ or - $Line =~ /^[0-9a-f]+:[_a-z0-9]+: Silenced \d+ todos, \d+ skips and \d+ traces.$/) + $Line =~ /^[_.a-z0-9-]+:\d+:[0-9.]* Line has been silenced after \d+ occurrences$/ or + $Line =~ /^[0-9a-f]+:[_a-z0-9]+:[0-9.]* Silenced \d+ todos, \d+ skips and \d+ traces.$/) { return "skip"; } @@ -558,8 +558,8 @@ sub ParseWineTestReport($$$) $Cur->{Group} = undef; } elsif (($Cur->{Unit} ne "" and - $Line =~ /($Cur->{UnitsRE}).c:\d+: Subtest ([_a-z0-9]+)/) or - $Line =~ /^([_a-z0-9]+).c:\d+: Subtest ([_a-z0-9]+)/) + $Line =~ /($Cur->{UnitsRE}).c:\d+:[0-9.]* Subtest ([_a-z0-9]+)/) or + $Line =~ /^([_a-z0-9]+).c:\d+:[0-9.]* Subtest ([_a-z0-9]+)/) { my ($Unit, $SubUnit) = ($1, $2); _CheckUnit($LogInfo, $Cur, $Unit, "$SubUnit subtest"); @@ -567,23 +567,23 @@ sub ParseWineTestReport($$$) $Cur->{UnitsRE} = join("|", keys %{$Cur->{Units}}); } 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): /) + $Line =~ /($Cur->{UnitsRE}).c:\d+:[0-9.]* Test (?:failed|succeeded inside todo block): /) or + $Line =~ /^([_a-z0-9]+).c:\d+:[0-9.]* Test (?:failed|succeeded inside todo block): /) { _CheckUnit($LogInfo, $Cur, $1, "failure"); _AddReportError($LogInfo, $Cur, $LineNo, $Line); $Cur->{LineFailures}++; } elsif (($Cur->{Unit} ne "" and - $Line =~ /($Cur->{UnitsRE}).c:\d+: Test marked todo: /) or - $Line =~ /^([_a-z0-9]+).c:\d+: Test marked todo: /) + $Line =~ /($Cur->{UnitsRE}).c:\d+:[0-9.]* Test marked todo: /) or + $Line =~ /^([_a-z0-9]+).c:\d+:[0-9.]* Test marked todo: /) { _CheckUnit($LogInfo, $Cur, $1, "todo"); $Cur->{LineTodos}++; } elsif (($Cur->{Unit} ne "" and - $Line =~ /($Cur->{UnitsRE}).c:\d+: Tests skipped: /) or - $Line =~ /^([_a-z0-9]+).c:\d+: Tests skipped: /) + $Line =~ /($Cur->{UnitsRE}).c:\d+:[0-9.]* Tests skipped: /) or + $Line =~ /^([_a-z0-9]+).c:\d+:[0-9.]* Tests skipped: /) { my $Unit = $1; # Don't complain and don't count misplaced skips. Only complain if they @@ -604,16 +604,16 @@ sub ParseWineTestReport($$$) $Cur->{LineFailures}++; } elsif (($Cur->{Unit} ne "" and - $Line =~ /($Cur->{UnitsRE}).c:\d+: IgnoreExceptions=([01])/) or - $Line =~ /^([_.a-z0-9]+).c:\d+: IgnoreExceptions=([01])/) + $Line =~ /($Cur->{UnitsRE}).c:\d+:[0-9.]* IgnoreExceptions=([01])/) or + $Line =~ /^([_.a-z0-9]+).c:\d+:[0-9.]* 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 /) + $Line =~ /([0-9a-f]+):($Cur->{UnitsRE}):[0-9.]* unhandled exception [0-9a-fA-F]{8} at /) or + $Line =~ /^([0-9a-f]+):([_.a-z0-9]+):[0-9.]* unhandled exception [0-9a-fA-F]{8} at /) { my ($Pid, $Unit) = ($1, $2); _CheckUnit($LogInfo, $Cur, $Unit, "unhandled exception"); @@ -641,8 +641,8 @@ sub ParseWineTestReport($$$) } } 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]+)/) + $Line =~ /($Cur->{UnitsRE}).c:\d+:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/) or + $Line =~ /^([_.a-z0-9]+).c:\d+:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/) { my ($Unit, $Pid) = ($1, $2); _CheckUnit($LogInfo, $Cur, $Unit, "child exception"); @@ -659,8 +659,8 @@ sub ParseWineTestReport($$$) } } 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./) + $Line =~ /([0-9a-f]+):($Cur->{Unit}):[0-9.]* \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./) or + $Line =~ /^([0-9a-f]+):([_a-z0-9]+):[0-9.]* \d+ tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./) { my ($Pid, $Unit, $Todos, $Failures, $Skips) = ($1, $2, $3, $4, $5);
@@ -1143,15 +1143,16 @@ sub _GetLineKey($) $Line =~ s/ +$//;
# Remove the line number - $Line =~ s/^([_a-z0-9]+.c:)\d+:( Test (?:failed|succeeded inside todo block):)/$1$2/ + $Line =~ s/^([_a-z0-9]+.c:)\d+:[0-9.]*( Test (?:failed|succeeded inside todo block):)/$1$2/ or $Line =~ s/^([._a-zA-Z0-9-]+:)\d+(: recipe for target )/$1$2/
# Remove the crash code address: it changes whenever the test is recompiled or $Line =~ s/^(Unhandled exception: .* code) (0x[0-9a-fA-F]{8,16}).$/$1/ # or the process id in Wine's exc_filter() lines - or $Line =~ s/^[0-9a-f]+:([_a-z0-9]+: unhandled exception [0-9a-fA-F]{8} at )[0-9a-fA-F]{8,16}$/$1/ + or $Line =~ s/^[0-9a-f]+:([_a-z0-9]+:)[0-9.]*( unhandled exception [0-9a-fA-F]{8} at )[0-9a-fA-F]{8,16}$/$1$2/ # or child process id - or $Line =~ s/^([_a-z0-9]+.c:)\d+:( unhandled exception [0-9a-fA-F]{8} in child process )[0-9a-fA-F]{4}$/$1$2/ + or $Line =~ s/^([_a-z0-9]+.c:)\d+:[0-9.]*( unhandled exception [0-9a-fA-F]{8} in child process )[0-9a-fA-F]{4}$/$1$2/ +
# The exact amount of data printed does not change the error or $Line =~ s/^([_.a-z0-9-]+:[_a-z0-9]* prints too much data )(\d+ bytes)$/$1/;