[contrib] validate_failures.py: fix python 3.12 escape sequence warnings
Adapt GCC's commit 90becd94cf92858555e0e538ec2091f952971453 to avoid
warnings such as:
validate_failures.py:68: SyntaxWarning: invalid escape sequence '\s'
_INTERESTING_RESULTS_REX = re.compile('(%s):\s*(\S+)\s*(.*)'
validate_failures.py:71: SyntaxWarning: invalid escape sequence '\s'
_VALID_RESULTS_REX = re.compile('([A-Z]+):\s*(\S+)\s*(.*)')
validate_failures.py:82: SyntaxWarning: invalid escape sequence '\.'
_EXP_LINE_REX = re.compile('^Running (?:.*:)?(.*) \.\.\.\n')
Change-Id: I097c100e31de39f8f1e923ad53b905b15512b719
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index 5dbeae1..052bbd1 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -65,10 +65,10 @@
# Note, 'NOEXE' state is used by llvm-test-suite.
_INTERESTING_RESULTS = [ 'FAIL', 'UNRESOLVED', 'XPASS', 'ERROR', 'NOEXE' ]
# <STATE>: <NAME> <DESCRIPTION"
-_INTERESTING_RESULTS_REX = re.compile('(%s):\s*(\S+)\s*(.*)'
+_INTERESTING_RESULTS_REX = re.compile(r'(%s):\s*(\S+)\s*(.*)'
% "|".join(_INTERESTING_RESULTS))
-_VALID_RESULTS_REX = re.compile('([A-Z]+):\s*(\S+)\s*(.*)')
+_VALID_RESULTS_REX = re.compile(r'([A-Z]+):\s*(\S+)\s*(.*)')
# Formats of .sum file sections
_TOOL_LINE_FORMAT = '\t\t=== %s tests ===\n'
@@ -76,11 +76,11 @@
_SUMMARY_LINE_FORMAT = '\n\t\t=== %s Summary ===\n'
# ... and their compiled regexs.
-_TOOL_LINE_REX = re.compile('^\t\t=== (.*) tests ===\n')
+_TOOL_LINE_REX = re.compile(r'^\t\t=== (.*) tests ===\n')
# Match .exp file name, optionally prefixed by a "tool:" name and a
# path ending with "testsuite/"
-_EXP_LINE_REX = re.compile('^Running (?:.*:)?(.*) \.\.\.\n')
-_SUMMARY_LINE_REX = re.compile('^\t\t=== (.*) Summary ===\n')
+_EXP_LINE_REX = re.compile(r'^Running (?:.*:)?(.*) \.\.\.\n')
+_SUMMARY_LINE_REX = re.compile(r'^\t\t=== (.*) Summary ===\n')
# Subdirectory of srcdir in which to find the manifest file.
_MANIFEST_SUBDIR = 'contrib/testsuite-management'