From patchwork Fri Jun 2 15:20:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kuvyrkov X-Patchwork-Id: 70528 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD3FD3839BEA for ; Fri, 2 Jun 2023 15:25:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD3FD3839BEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685719541; bh=HMtHJ9HJBcLm6iuRM6ms9W94+BEXFAZM7hdAwPKceHs=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=qi0mRc4ewqqkS3WC6rwvhHscubUVLTBvtNNkMXMQnc9M5GbcK4p+h8RZBd7MhImtJ TmR6VUYP7uLqtDc5E3PJIts7OqAqw/UgKEImOgJ0rE1wwaUf9BfR/K5CK8SyGlSqL2 5EH97Udmqi1+iGGVuCUzJneobGOPPKFMu73lcvlo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 68BFE385C6E4 for ; Fri, 2 Jun 2023 15:22:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 68BFE385C6E4 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f4453b607eso369031e87.1 for ; Fri, 02 Jun 2023 08:22:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685719318; x=1688311318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HMtHJ9HJBcLm6iuRM6ms9W94+BEXFAZM7hdAwPKceHs=; b=bDAjt9RPuPNY6kPR5eg8ZVKyF0IAqkaC4zCU+6YZbhp1nq88zC65/bIJ3nQt5t+zg2 Bynlput3u5tttwgboRFSA3bn75sVDfzWdW/r9rE4Jk6IjyQgirli4nCbCAx2ztt+dWsN xpdfnEVP/KKOVPnAa7XwQast7Jendg5Cj1+uhZdAI/0ToAIs+y29q2nRv6emIzD1aJ6m vVbcrrtZTECg+dPcF5iG9+PHX+1Sue8z6YIer6C7tGqiPgIIwIVeOBV9Uw1EXYsnRgmk Utgvy7IgXDgLqxXJaqMxVz3N/4AycUN1WXFk7j/U705x2oB/iUT03PS6pHrAfdlcpxU2 Bjcg== X-Gm-Message-State: AC+VfDwPtG4flT/6uhpmfKaBtFXzifA167donf5zdXLBLRtNvW6HaFiB JoamDdEWKJ4ueQuhn5wJooTL44VfkmrwdfURc9cjTHY= X-Google-Smtp-Source: ACHHUZ4yWKqYE2XgXfY0tzJCtTdV1aoTQw9tXqqYt9y252kpKWwiVqOL4J1qxyZXVgJgky7XDG4ECA== X-Received: by 2002:a05:651c:118b:b0:2af:1c95:c4a8 with SMTP id w11-20020a05651c118b00b002af1c95c4a8mr4006123ljo.5.1685719318193; Fri, 02 Jun 2023 08:21:58 -0700 (PDT) Received: from localhost.localdomain (static.225.72.216.95.clients.your-server.de. [95.216.72.225]) by smtp.gmail.com with ESMTPSA id a18-20020a2eb172000000b002a8ac166e55sm255122ljm.44.2023.06.02.08.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 08:21:56 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: Diego Novillo , Doug Evans , Maxim Kuvyrkov Subject: [PATCH 12/12] [contrib] validate_failures.py: Ignore stray filesystem paths in results Date: Fri, 2 Jun 2023 15:20:52 +0000 Message-Id: <20230602152052.1874860-13-maxim.kuvyrkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230602152052.1874860-1-maxim.kuvyrkov@linaro.org> References: <20230602152052.1874860-1-maxim.kuvyrkov@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Maxim Kuvyrkov via Gcc-patches From: Maxim Kuvyrkov Reply-To: Maxim Kuvyrkov Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This patch simplifies comparison of results that have filesystem paths. E.g., (assuming different values of ): Running /home/user/gcc-N/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ... ERROR: tcl error sourcing /home/user/gcc-N/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp. We add "--srcpath ", option, and set it by default to "[^ ]+/testsuite/", which works well for all components of the GNU Toolchain. We then remove substrings matching from paths of .exp files and from occasional "ERROR:" results. --- contrib/testsuite-management/validate_failures.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index a77aabe0bdd..4dfd9cda4e2 100755 --- a/contrib/testsuite-management/validate_failures.py +++ b/contrib/testsuite-management/validate_failures.py @@ -135,6 +135,9 @@ class TestResult(object): (self.state, self.name, self.description) = _VALID_TEST_RESULTS_REX.match(summary_line).groups() + if _OPTIONS.srcpath_regex and _OPTIONS.srcpath_regex != '': + self.description = re.sub(_OPTIONS.srcpath_regex, '', + self.description) except: print('Failed to parse summary line: "%s"' % summary_line, file=sys.stderr) @@ -361,6 +364,9 @@ def ParseManifestWorker(result_set, manifest_path): result_set.add(result) elif IsExpLine(orig_line): result_set.current_exp = _EXP_LINE_REX.match(orig_line).groups()[0] + if _OPTIONS.srcpath_regex and _OPTIONS.srcpath_regex != '': + result_set.current_exp = re.sub(_OPTIONS.srcpath_regex, '', + result_set.current_exp) elif IsToolLine(orig_line): result_set.current_tool = _TOOL_LINE_REX.match(orig_line).groups()[0] elif IsSummaryLine(orig_line): @@ -400,6 +406,9 @@ def ParseSummary(sum_fname): result_set.add(result) elif IsExpLine(line): result_set.current_exp = _EXP_LINE_REX.match(line).groups()[0] + if _OPTIONS.srcpath_regex and _OPTIONS.srcpath_regex != '': + result_set.current_exp = re.sub(_OPTIONS.srcpath_regex, '', + result_set.current_exp) result_set.testsuites.add((result_set.current_tool, result_set.current_exp)) elif IsToolLine(line): @@ -640,6 +649,12 @@ def Main(argv): help='Use provided date YYYYMMDD to decide whether ' 'manifest entries with expiry settings have expired ' 'or not. (default = Use today date)') + parser.add_option('--srcpath', action='store', type='string', + dest='srcpath_regex', default='[^ ]+/testsuite/', + help='Remove provided path (can be a regex) from ' + 'the result entries. This is useful to remove ' + 'occasional filesystem path from the results. ' + '(default = "[^ ]+/testsuite/")') parser.add_option('--inverse_match', action='store_true', dest='inverse_match', default=False, help='Inverse result sets in comparison. '