From: Thiago Bauermann Date: Thu, 1 Jun 2023 12:25:18 +0000 (+0000) Subject: [contrib] validate_failures.py: Improve error output X-Git-Tag: basepoints/gcc-15~8320 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7aa47751d23ceaf7a7fa746e30dc3266f6c40ad3;p=thirdparty%2Fgcc.git [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. --- diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 6dcdcf5c69b6..1919935cf537 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