aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2023-06-01 12:00:48 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-06-14 14:29:47 +0000
commit484a48640c4619b3ce0c44e5acef78729f34972d (patch)
tree986f6e2c30582b965944bbc6a17c9680e38fa280
parent5d52f35546418a641983572bd3bf8e233a5b1e16 (diff)
downloadgcc-484a48640c4619b3ce0c44e5acef78729f34972d.zip
gcc-484a48640c4619b3ce0c44e5acef78729f34972d.tar.gz
gcc-484a48640c4619b3ce0c44e5acef78729f34972d.tar.bz2
[contrib] validate_failures.py: Support "$tool:" prefix in exp names
This makes it easier to extract the $tool:$exp pair when iterating over failures/flaky tests, which, in turn, simplifies re-running testsuite parts that have unexpected failures or passes. contrib/ChangeLog: * testsuite-management/validate_failures.py (_EXP_LINE_FORMAT,) (_EXP_LINE_REX, ResultSet): Support "$tool:" prefix in exp names.
-rwxr-xr-xcontrib/testsuite-management/validate_failures.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index c4b9fc3..6dcdcf5 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -67,12 +67,14 @@ _VALID_TEST_RESULTS_REX = re.compile('(%s):\s*(\S+)\s*(.*)'
# Formats of .sum file sections
_TOOL_LINE_FORMAT = '\t\t=== %s tests ===\n'
-_EXP_LINE_FORMAT = '\nRunning %s ...\n'
+_EXP_LINE_FORMAT = '\nRunning %s:%s ...\n'
_SUMMARY_LINE_FORMAT = '\n\t\t=== %s Summary ===\n'
# ... and their compiled regexs.
_TOOL_LINE_REX = re.compile('^\t\t=== (.*) tests ===\n')
-_EXP_LINE_REX = re.compile('^Running (.*\.exp) \.\.\.\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')
# Subdirectory of srcdir in which to find the manifest file.
@@ -236,7 +238,7 @@ class ResultSet(set):
outfile.write(_TOOL_LINE_FORMAT % current_tool)
if current_exp != result.exp:
current_exp = result.exp
- outfile.write(_EXP_LINE_FORMAT % current_exp)
+ outfile.write(_EXP_LINE_FORMAT % (current_tool, current_exp))
outfile.write('%s\n' % result)
outfile.write(_SUMMARY_LINE_FORMAT % 'Results')