[PATCH 1/2] testbot/LogUtils: Ignore the variable parts of failure messages.

Francois Gouget fgouget at codeweavers.com
Sun Dec 29 17:48:07 CST 2019


Some failure messages have to include elements that change with every
run in order to allow diagnosing. But this makes the failure message
look different with every run, thus breaking the detection of new
failures.
So such 'variable' parts can now be enclosed in double parentheses, for
instance "((0x2d))", to let the TestBot know it should ignore this part
when comparing failure messages.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48209
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

I'm open to other ways to identify the variable parts.

 testbot/lib/WineTestBot/LogUtils.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index c57742691..0489f3e5b 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -863,6 +863,10 @@ sub _GetLineKey($)
   my ($Line) = @_;
   return undef if (!defined $Line);
 
+  # Remove variable parts.
+  # Use a non-greedy match to ensure the ignored part does not contain '))'.
+  $Line =~ s/\(\(.+?\)\)/(())/g;
+
   # Remove the line number
   $Line =~ s/^([_a-z0-9]+\.c:)\d+:( Test (?:failed|succeeded inside todo block): )/$1$2/;
 
-- 
2.20.1




More information about the wine-devel mailing list