From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1487) id 2BD343858288; Wed, 14 Jun 2023 14:31:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BD343858288 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686753083; bh=Nt6P1xfILIJnrYR+q6WVUkfg13EFYN0oGrnq9s+u0Es=; h=From:To:Subject:Date:From; b=SkTv8gP/luDZA+4nhTbcAwjwHiMaMr0rwRe/bWFFpg/dqJL7eKo5BU17FjlqabAhK qhcXL32v7epeHFaeBYIklHGu/dkPSn7LheXfVmj65Eu2fwhvx54f6BuoxK5j/EgUiT +PPI6XhbIUw9S57W3kuEhYwrRYo5l/bDiIa1Mruk= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Maxim Kuvyrkov To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1816] [contrib] validate_failures.py: Be more stringent in parsing result lines X-Act-Checkin: gcc X-Git-Author: Maxim Kuvyrkov X-Git-Refname: refs/heads/master X-Git-Oldrev: e341d15be3b93674308734422b30803c25521d5d X-Git-Newrev: d4d776a341309cee59bfcb72bba8ae8442d05db7 Message-Id: <20230614143123.2BD343858288@sourceware.org> Date: Wed, 14 Jun 2023 14:31:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:d4d776a341309cee59bfcb72bba8ae8442d05db7 commit r14-1816-gd4d776a341309cee59bfcb72bba8ae8442d05db7 Author: Maxim Kuvyrkov Date: Thu Jun 1 12:05:08 2023 +0000 [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: --- contrib/testsuite-management/validate_failures.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 26ea1d6f53b..f2d7b099d78 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)) +# :