Re: [PING] [PATCH] Harmonize headers between both dg-extract-results scripts

2023-10-19 Thread Jeff Law




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 :-)



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.





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?)?

, "write after approval".

Sure.  I'd sponsor them.

jeff


Re: [PING] [PATCH] Harmonize headers between both dg-extract-results scripts

2023-10-18 Thread Thomas Schwinge
Hi!

On 2023-09-29T08:52:24-0600, Jeff Law  wrote:
> On 9/29/23 02:19, Paul Iannetta wrote:
>> On Tue, Sep 26, 2023 at 08:29:11AM -0600, Jeff Law wrote:
>>> On 9/25/23 03:55, Paul Iannetta wrote:
 On Mon, Sep 18, 2023 at 08:39:34AM +0200, Paul Iannetta wrote:
> On Thu, Sep 14, 2023 at 04:24:33PM +0200, Paul Iannetta wrote:
>> This is a small patch so that both dg-extract-results.py and
>> dg-extract-results.sh share the same header.  In particular, it fixes
>> the fact that the regexp r'^Test Run By (\S+) on (.*)$' was never
>> matched in the python file.

Thanks for looking into this!

I confirm that 'Test run by' lines now appear in
'contrib/dg-extract-results.py'-filtered '*.sum' files.

However, a number of upper-case 'Test Run By' instances do remain in GCC
sources:

$ git grep --cached 'Test Run By'
contrib/dg-extract-results.py:# and in which the second is the 
associated 'Test Run By' line.
contrib/dglib.pm:   } elsif(/^(Test Run By \S+ on|runtest 
completed at) ... (.{3}) (\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2}) (\d{4})/) {
gcc/testsuite/ada/acats/run_all.sh:display "Test Run By $USER on `date`"
gotools/Makefile.am:@echo "Test Run By $${USER} on `date`" > 
gotools.head
gotools/Makefile.in:@NATIVE_TRUE@   @echo "Test Run By $${USER} on 
`date`" > gotools.head
libgo/Makefile.am:  @echo "Test Run By $${USER} on `date`" > libgo.head
libgo/Makefile.in:  @echo "Test Run By $${USER} on `date`" > libgo.head

..., and I observe the following "regression" via the upper-case instance
in 'gcc/testsuite/ada/acats/run_all.sh':

--- [...]/gcc/testsuite/ada/acats/acats.sum
+++ [...]/gcc/testsuite/ada/acats/acats.sum
@@ -1,4 +1,3 @@
-Test Run By tschwing on Sun Sep 17 22:02:20 CEST 2023
=== acats configuration ===
[...]

(The upper-case 'echo's in gotools ('[...]/gotools/gotools.sum') and
libgo ('[...]/[...]/libgo/libgo.sum') evidently are not affected by your
change; presumably this testing doesn't use
'contrib/dg-extract-results.py'.)

Is this (case variants) maybe something that has changed in DejaGnu at
some point in time?  (I have not checked.)

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)?


> By the way, the bash script dg-extract-results.sh checks whether
> python is available by invoking python.  However, it seems that the
> policy on newer machines is to not provide python as a symlink (at
> least on Ubuntu 22.04 and above; and RHEL 8).  Therefore, we might
> want to also check against python3 so that the bash script does not
> fail to find python even though it is available.

See  "'python' vs. 'python3'".


>> May I ask to you commit it to trunk on my behalf?

> Done.  Thanks for letting me know you didn't have write access.

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?)?

, "write after approval".


>> Author: Paul Iannetta 
>> Date:   Thu Sep 14 15:43:58 2023 +0200
>>
>>   Harmonize headers between both dg-extract-results scripts
>>
>>   The header of the python version looked like:
>>   Target is ...
>>   Host   is ...
>>   The header of the bash version looked like:
>>   Test run by ... on ...
>>   Target is ...
>>
>>   After this change both headers look like:
>>   Test run by ... on ...
>>   Target is ...
>>   Host   is ...
>>
>>   The order of the tests is not the same but since dg-cmp-results.sh 
>> it
>>   does not matter much.
>>
>>   contrib/ChangeLog:
>>
>>   2023-09-14  Paul Iannetta  
>>
>>   * dg-extract-results.py: Print the "Test run" line.
>>   * dg-extract-results.sh: Print the "Host" line.

>> diff --git a/contrib/dg-extract-results.py 
>> b/contrib/dg-extract-results.py
>> index 30aa68771d4..34da1808c5f 100644
>> --- a/contrib/dg-extract-results.py
>> +++ b/contrib/dg-extract-results.py
>> @@ -113,7 +113,7 @@ 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 (.*)$')
>>  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'
>> diff --git a/contrib/dg-extrac

Re: [PING] [PATCH] Harmonize headers between both dg-extract-results scripts

2023-09-29 Thread Jeff Law




On 9/29/23 02:19, Paul Iannetta wrote:

On Tue, Sep 26, 2023 at 08:29:11AM -0600, Jeff Law wrote:



On 9/25/23 03:55, Paul Iannetta wrote:

On Mon, Sep 18, 2023 at 08:39:34AM +0200, Paul Iannetta wrote:

On Thu, Sep 14, 2023 at 04:24:33PM +0200, Paul Iannetta wrote:

Hi,

This is a small patch so that both dg-extract-results.py and
dg-extract-results.sh share the same header.  In particular, it fixes
the fact that the regexp r'^Test Run By (\S+) on (.*)$' was never
matched in the python file.


By the way, the bash script dg-extract-results.sh checks whether
python is available by invoking python.  However, it seems that the
policy on newer machines is to not provide python as a symlink (at
least on Ubuntu 22.04 and above; and RHEL 8).  Therefore, we might
want to also check against python3 so that the bash script does not
fail to find python even though it is available.

Thanks,
Paul



Author: Paul Iannetta 
Date:   Thu Sep 14 15:43:58 2023 +0200

  Harmonize headers between both dg-extract-results scripts

  The header of the python version looked like:
  Target is ...
  Host   is ...
  The header of the bash version looked like:
  Test run by ... on ...
  Target is ...

  After this change both headers look like:
  Test run by ... on ...
  Target is ...
  Host   is ...

  The order of the tests is not the same but since dg-cmp-results.sh it
  does not matter much.

  contrib/ChangeLog:

  2023-09-14  Paul Iannetta  

  * dg-extract-results.py: Print the "Test run" line.
  * dg-extract-results.sh: Print the "Host" line.

OK
jeff


Thanks,
May I ask to you commit it to trunk on my behalf?

Done.  Thanks for letting me know you didn't have write access.

Jeff


Re: [PING] [PATCH] Harmonize headers between both dg-extract-results scripts

2023-09-29 Thread Paul Iannetta
On Tue, Sep 26, 2023 at 08:29:11AM -0600, Jeff Law wrote:
> 
> 
> On 9/25/23 03:55, Paul Iannetta wrote:
> > On Mon, Sep 18, 2023 at 08:39:34AM +0200, Paul Iannetta wrote:
> > > On Thu, Sep 14, 2023 at 04:24:33PM +0200, Paul Iannetta wrote:
> > > > Hi,
> > > > 
> > > > This is a small patch so that both dg-extract-results.py and
> > > > dg-extract-results.sh share the same header.  In particular, it fixes
> > > > the fact that the regexp r'^Test Run By (\S+) on (.*)$' was never
> > > > matched in the python file.
> > > 
> > > By the way, the bash script dg-extract-results.sh checks whether
> > > python is available by invoking python.  However, it seems that the
> > > policy on newer machines is to not provide python as a symlink (at
> > > least on Ubuntu 22.04 and above; and RHEL 8).  Therefore, we might
> > > want to also check against python3 so that the bash script does not
> > > fail to find python even though it is available.
> > > 
> > > Thanks,
> > > Paul
> > > 
> > > 
> > > > Author: Paul Iannetta 
> > > > Date:   Thu Sep 14 15:43:58 2023 +0200
> > > > 
> > > >  Harmonize headers between both dg-extract-results scripts
> > > > 
> > > >  The header of the python version looked like:
> > > >  Target is ...
> > > >  Host   is ...
> > > >  The header of the bash version looked like:
> > > >  Test run by ... on ...
> > > >  Target is ...
> > > > 
> > > >  After this change both headers look like:
> > > >  Test run by ... on ...
> > > >  Target is ...
> > > >  Host   is ...
> > > > 
> > > >  The order of the tests is not the same but since dg-cmp-results.sh 
> > > > it
> > > >  does not matter much.
> > > > 
> > > >  contrib/ChangeLog:
> > > > 
> > > >  2023-09-14  Paul Iannetta  
> > > > 
> > > >  * dg-extract-results.py: Print the "Test run" line.
> > > >  * dg-extract-results.sh: Print the "Host" line.
> OK
> jeff
> 
Thanks,
May I ask to you commit it to trunk on my behalf?

Paul

(Kalray has a corporate copyright assignment with the FSF, so there
should be no licensing problem)






Re: [PING] [PATCH] Harmonize headers between both dg-extract-results scripts

2023-09-26 Thread Jeff Law




On 9/25/23 03:55, Paul Iannetta wrote:

On Mon, Sep 18, 2023 at 08:39:34AM +0200, Paul Iannetta wrote:

On Thu, Sep 14, 2023 at 04:24:33PM +0200, Paul Iannetta wrote:

Hi,

This is a small patch so that both dg-extract-results.py and
dg-extract-results.sh share the same header.  In particular, it fixes
the fact that the regexp r'^Test Run By (\S+) on (.*)$' was never
matched in the python file.


By the way, the bash script dg-extract-results.sh checks whether
python is available by invoking python.  However, it seems that the
policy on newer machines is to not provide python as a symlink (at
least on Ubuntu 22.04 and above; and RHEL 8).  Therefore, we might
want to also check against python3 so that the bash script does not
fail to find python even though it is available.

Thanks,
Paul



Author: Paul Iannetta 
Date:   Thu Sep 14 15:43:58 2023 +0200

 Harmonize headers between both dg-extract-results scripts

 The header of the python version looked like:
 Target is ...
 Host   is ...
 The header of the bash version looked like:
 Test run by ... on ...
 Target is ...

 After this change both headers look like:
 Test run by ... on ...
 Target is ...
 Host   is ...

 The order of the tests is not the same but since dg-cmp-results.sh it
 does not matter much.

 contrib/ChangeLog:

 2023-09-14  Paul Iannetta  

 * dg-extract-results.py: Print the "Test run" line.
 * dg-extract-results.sh: Print the "Host" line.

OK
jeff


[PING] [PATCH] Harmonize headers between both dg-extract-results scripts

2023-09-25 Thread Paul Iannetta
On Mon, Sep 18, 2023 at 08:39:34AM +0200, Paul Iannetta wrote:
> On Thu, Sep 14, 2023 at 04:24:33PM +0200, Paul Iannetta wrote:
> > Hi,
> > 
> > This is a small patch so that both dg-extract-results.py and
> > dg-extract-results.sh share the same header.  In particular, it fixes
> > the fact that the regexp r'^Test Run By (\S+) on (.*)$' was never
> > matched in the python file.
> 
> By the way, the bash script dg-extract-results.sh checks whether
> python is available by invoking python.  However, it seems that the
> policy on newer machines is to not provide python as a symlink (at
> least on Ubuntu 22.04 and above; and RHEL 8).  Therefore, we might
> want to also check against python3 so that the bash script does not
> fail to find python even though it is available.
> 
> Thanks,
> Paul
> 
> 
> > Author: Paul Iannetta 
> > Date:   Thu Sep 14 15:43:58 2023 +0200
> > 
> > Harmonize headers between both dg-extract-results scripts
> > 
> > The header of the python version looked like:
> > Target is ...
> > Host   is ...
> > The header of the bash version looked like:
> > Test run by ... on ...
> > Target is ...
> > 
> > After this change both headers look like:
> > Test run by ... on ...
> > Target is ...
> > Host   is ...
> > 
> > The order of the tests is not the same but since dg-cmp-results.sh it
> > does not matter much.
> > 
> > contrib/ChangeLog:
> > 
> > 2023-09-14  Paul Iannetta  
> > 
> > * dg-extract-results.py: Print the "Test run" line.
> > * dg-extract-results.sh: Print the "Host" line.
> > 
> > diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
> > index 30aa68771d4..34da1808c5f 100644
> > --- a/contrib/dg-extract-results.py
> > +++ b/contrib/dg-extract-results.py
> > @@ -113,7 +113,7 @@ 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 (.*)$')
> >  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'
> > diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
> > index ff6c50d029c..57f6fe0e997 100755
> > --- a/contrib/dg-extract-results.sh
> > +++ b/contrib/dg-extract-results.sh
> > @@ -271,7 +271,7 @@ cat $SUM_FILES \
> >  
> >  # Write the begining of the combined summary file.
> >  
> > -head -n 2 $FIRST_SUM
> > +head -n 3 $FIRST_SUM
> >  echo
> >  echo " === $TOOL tests ==="
> >  echo






Re: [PATCH] Harmonize headers between both dg-extract-results scripts

2023-09-17 Thread Paul Iannetta via Gcc-patches
On Thu, Sep 14, 2023 at 04:24:33PM +0200, Paul Iannetta wrote:
> Hi,
> 
> This is a small patch so that both dg-extract-results.py and
> dg-extract-results.sh share the same header.  In particular, it fixes
> the fact that the regexp r'^Test Run By (\S+) on (.*)$' was never
> matched in the python file.

By the way, the bash script dg-extract-results.sh checks whether
python is available by invoking python.  However, it seems that the
policy on newer machines is to not provide python as a symlink (at
least on Ubuntu 22.04 and above; and RHEL 8).  Therefore, we might
want to also check against python3 so that the bash script does not
fail to find python even though it is available.

Thanks,
Paul


> Author: Paul Iannetta 
> Date:   Thu Sep 14 15:43:58 2023 +0200
> 
> Harmonize headers between both dg-extract-results scripts
> 
> The header of the python version looked like:
> Target is ...
> Host   is ...
> The header of the bash version looked like:
> Test run by ... on ...
> Target is ...
> 
> After this change both headers look like:
> Test run by ... on ...
> Target is ...
> Host   is ...
> 
> The order of the tests is not the same but since dg-cmp-results.sh it
> does not matter much.
> 
> contrib/ChangeLog:
> 
> 2023-09-14  Paul Iannetta  
> 
> * dg-extract-results.py: Print the "Test run" line.
> * dg-extract-results.sh: Print the "Host" line.
> 
> diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
> index 30aa68771d4..34da1808c5f 100644
> --- a/contrib/dg-extract-results.py
> +++ b/contrib/dg-extract-results.py
> @@ -113,7 +113,7 @@ 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 (.*)$')
>  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'
> diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
> index ff6c50d029c..57f6fe0e997 100755
> --- a/contrib/dg-extract-results.sh
> +++ b/contrib/dg-extract-results.sh
> @@ -271,7 +271,7 @@ cat $SUM_FILES \
>  
>  # Write the begining of the combined summary file.
>  
> -head -n 2 $FIRST_SUM
> +head -n 3 $FIRST_SUM
>  echo
>  echo "   === $TOOL tests ==="
>  echo






[PATCH] Harmonize headers between both dg-extract-results scripts

2023-09-14 Thread Paul Iannetta via Gcc-patches
Hi,

This is a small patch so that both dg-extract-results.py and
dg-extract-results.sh share the same header.  In particular, it fixes
the fact that the regexp r'^Test Run By (\S+) on (.*)$' was never
matched in the python file.

Thanks,
--
Paul
Kalray


Author: Paul Iannetta 
Date:   Thu Sep 14 15:43:58 2023 +0200

Harmonize headers between both dg-extract-results scripts

The header of the python version looked like:
Target is ...
Host   is ...
The header of the bash version looked like:
Test run by ... on ...
Target is ...

After this change both headers look like:
Test run by ... on ...
Target is ...
Host   is ...

The order of the tests is not the same but since dg-cmp-results.sh it
does not matter much.

contrib/ChangeLog:

2023-09-14  Paul Iannetta  

* dg-extract-results.py: Print the "Test run" line.
* dg-extract-results.sh: Print the "Host" line.

diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py
index 30aa68771d4..34da1808c5f 100644
--- a/contrib/dg-extract-results.py
+++ b/contrib/dg-extract-results.py
@@ -113,7 +113,7 @@ 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 (.*)$')
 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'
diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh
index ff6c50d029c..57f6fe0e997 100755
--- a/contrib/dg-extract-results.sh
+++ b/contrib/dg-extract-results.sh
@@ -271,7 +271,7 @@ cat $SUM_FILES \
 
 # Write the begining of the combined summary file.
 
-head -n 2 $FIRST_SUM
+head -n 3 $FIRST_SUM
 echo
 echo " === $TOOL tests ==="
 echo