Francois Gouget : testbot/LogUtils: Optimise the _GetLineKey() line cleanup.

Alexandre Julliard julliard at winehq.org
Mon Mar 16 16:45:12 CDT 2020


Module: tools
Branch: master
Commit: 1d3e1efa699fee5564f41ab1dcc03a6ab989ea64
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=1d3e1efa699fee5564f41ab1dcc03a6ab989ea64

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Mar 13 11:12:41 2020 +0100

testbot/LogUtils: Optimise the _GetLineKey() line cleanup.

Most line cleanups are mutually exclusive so stop trying after the first
successful attempt.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/LogUtils.pm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index bf933a0..57229bc 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -1048,15 +1048,15 @@ sub _GetLineKey($)
   return undef if (!defined $Line);
 
   # 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+:( Test (?:failed|succeeded inside todo block): )/$1$2/
 
   # Remove the crash code address: it changes whenever the test is recompiled
-  $Line =~ s/^(Unhandled exception: .* code) \(0x[0-9a-fA-F]{8,16}\)\.$/$1/;
-  # and the process id
-  $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/^(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/
 
   # The exact amount of data printed does not change the error
-  $Line =~ s/^([_.a-z0-9-]+:[_a-z0-9]* prints too much data )\(\d+ bytes\)$/$1/;
+  or $Line =~ s/^([_.a-z0-9-]+:[_a-z0-9]* prints too much data )\(\d+ bytes\)$/$1/;
 
   # Note: The 'done (258)' lines are modified by ParseWineTestReport() and
   #       no longer contain the pid. So they need no further change here.




More information about the wine-cvs mailing list