aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Bauermann <thiago.bauermann@linaro.org>2023-06-01 12:25:18 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-06-14 14:29:47 +0000
commit7aa47751d23ceaf7a7fa746e30dc3266f6c40ad3 (patch)
tree8b20e322800c62406eafb3376879028259733079
parent484a48640c4619b3ce0c44e5acef78729f34972d (diff)
downloadgcc-7aa47751d23ceaf7a7fa746e30dc3266f6c40ad3.zip
gcc-7aa47751d23ceaf7a7fa746e30dc3266f6c40ad3.tar.gz
gcc-7aa47751d23ceaf7a7fa746e30dc3266f6c40ad3.tar.bz2
[contrib] validate_failures.py: Improve error output
- Print message in case of broken sum file error. - Print error messages to stderr. The script's stdout is, usually, redirected to a file, and error messages shouldn't go there. contrib/ChangeLog: * testsuite-management/validate_failures.py (TestResult): Improve error output.
-rwxr-xr-xcontrib/testsuite-management/validate_failures.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py
index 6dcdcf5..1919935 100755
--- a/contrib/testsuite-management/validate_failures.py
+++ b/contrib/testsuite-management/validate_failures.py
@@ -136,12 +136,15 @@ class TestResult(object):
self.name,
self.description) = _VALID_TEST_RESULTS_REX.match(summary_line).groups()
except:
- print('Failed to parse summary line: "%s"' % summary_line)
+ print('Failed to parse summary line: "%s"' % summary_line,
+ file=sys.stderr)
raise
self.ordinal = ordinal
if tool == None or exp == None:
# .sum file seem to be broken. There was no "tool" and/or "exp"
# lines preceding this result.
+ print(f'.sum file seems to be broken: tool="{tool}", exp="{exp}", summary_line="{summary_line}"',
+ file=sys.stderr)
raise
self.tool = tool
self.exp = exp