diff mbox series

Ignore case of header line in dg-extract-results.py

Message ID 20231024080416.k3htpcxgowjsgriv@ws2202.lin.mbt.kalray.eu
State New
Headers show
Series Ignore case of header line in dg-extract-results.py | expand

Commit Message

Paul Iannetta Oct. 24, 2023, 8:04 a.m. UTC
On Thu, Oct 19, 2023 at 10:48:17AM -0600, Jeff Law wrote:
> On 10/18/23 03:35, Thomas Schwinge wrote:
> > 
> > Is this (case variants) maybe something that has changed in DejaGnu at
> > some point in time?  (I have not checked.)
> No idea :-)
>
Yes, it changed around 2016.

> > I suggest that we adapt all remaining upper-case instances in GCC,
> > similar to your change.  And/or, as applicable, recognize both variants
> > (or ignore case distinctions generally)?
> Yea, we should try to get this commonized.  Probably wise to recognize both
> variants as well -- especially if there are instances of these strings which
> aren't under GCC's contorl.
> 
In retrospect, I also think that we the regex should be case
insensitive, that will allow to be compatible with older releases of
dejagnu and will incur less changes in GCC. (cf. attached patch)

> > Given Paul's (and colleagues'?) ongoing work on GCC (Kalray KVX back end,
> > complex numbers support), is it maybe now time to enable Git write access
> > for him (them?)?
> > 
> > <https://gcc.gnu.org/gitwrite.html>, "write after approval".
> Sure.  I'd sponsor them.

Thanks. May I request an account on sourceware.org, mentioning you as
our sponsor?

Paul

Comments

Alexandre Oliva Oct. 26, 2023, 4:09 a.m. UTC | #1
On Oct 24, 2023, Paul Iannetta <piannetta@kalrayinc.com> wrote:

> 	* dg-extract-results.py: Make the test_run regex case
> 	  insensitive.

It looks reasonable to me, but I'm not sure this is a change I'm
entitled to approve.  Thanks!
Jeff Law Oct. 26, 2023, 4:13 a.m. UTC | #2
On 10/25/23 22:09, Alexandre Oliva wrote:
> On Oct 24, 2023, Paul Iannetta <piannetta@kalrayinc.com> wrote:
> 
>> 	* dg-extract-results.py: Make the test_run regex case
>> 	  insensitive.
> 
> It looks reasonable to me, but I'm not sure this is a change I'm
> entitled to approve.  Thanks!
Even so, I trust your judgment, so OK for the trunk :-)

jeff
diff mbox series

Patch

From ce418afa1d3098603e26e1fd2ee262a8ab72e5ab Mon Sep 17 00:00:00 2001
From: Paul Iannetta <piannetta@kalrayinc.com>
Date: Tue, 24 Oct 2023 09:48:42 +0200
Subject: [PATCH] dg-extract-results.py: Ignore case in header line

DejaGNU changed its header line from "Test Run By" to "Test run by"
around 2016.  This patch makes it so that both alternatives are
correcly detected.

contrib/ChangeLog:

2023-10-24  Paul Iannetta  <piannetta@kalrayinc.com>

	* dg-extract-results.py: Make the test_run regex case
	  insensitive.
---
 contrib/dg-extract-results.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 0bc65d30eaf..e92e8756ccc 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -113,7 +113,8 @@  class Prog:
         # Whether to create .sum rather than .log output.
         self.do_sum = True
         # Regexps used while parsing.
-        self.test_run_re = re.compile (r'^Test run by (\S+) on (.*)$')
+        self.test_run_re = re.compile (r'^Test run by (\S+) on (.*)$',
+                                       re.IGNORECASE)
         self.tool_re = re.compile (r'^\t\t=== (.*) tests ===$')
         self.result_re = re.compile (r'^(PASS|XPASS|FAIL|XFAIL|UNRESOLVED'
                                      r'|WARNING|ERROR|UNSUPPORTED|UNTESTED'
-- 
2.35.1.500.gb896f729e2