From: Maxim Kuvyrkov Date: Thu, 1 Jun 2023 12:05:08 +0000 (+0000) Subject: [contrib] validate_failures.py: Be more stringent in parsing result lines X-Git-Tag: basepoints/gcc-15~8323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4d776a341309cee59bfcb72bba8ae8442d05db7;p=thirdparty%2Fgcc.git [contrib] validate_failures.py: Be more stringent in parsing result lines Before this patch we would identify malformed line "UNRESOLVEDTest run by tcwg-buildslave on Mon Aug 23 10:17:50 2021" as an interesting result, only to fail in TestResult:__init__ due to missing ":" after UNRESOLVED. This patch makes all places that parse result lines use a single compiled regex. contrib/ChangeLog: * testsuite-management/validate_failures.py (_VALID_TEST_RESULTS_REX): Update. (TestResult): Use _VALID_TEST_RESULTS_REX. --- diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 26ea1d6f53bf..f2d7b099d782 100755 --- a/contrib/testsuite-management/validate_failures.py +++ b/contrib/testsuite-management/validate_failures.py @@ -60,9 +60,10 @@ import os import re import sys -# Handled test results. _VALID_TEST_RESULTS = [ 'FAIL', 'UNRESOLVED', 'XPASS', 'ERROR' ] -_VALID_TEST_RESULTS_REX = re.compile("%s" % "|".join(_VALID_TEST_RESULTS)) +# :