diff mbox series

gcc-changelog: Add libstdc++-v3/testsuite to wildcard prefixes

Message ID 20201127162354.GA2308844@redhat.com
State New
Headers show
Series gcc-changelog: Add libstdc++-v3/testsuite to wildcard prefixes | expand

Commit Message

Jonathan Wakely Nov. 27, 2020, 4:23 p.m. UTC
This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which
was one of the original motivations for adding wildcard support in the
first place:
https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html

contrib/ChangeLog:

	* gcc-changelog/git_commit.py (wildcard_prefixes): Add libstdc++
	testsuite directory.

OK to push?

This still doesn't actually meet my needs, because I'd like to be able
to do:

	* testsuite/foo/*: Something for foo tests.
	* testsuite/bar/baz/*: Something for baz tests.

So it would be nice if wildcards worked for any directory below a
wildcard prefix (as long as the directory actually exists).

It also seems that I can't have a commit where all changes are
described by a wildcard entry. It seems to require a non-wildcard one
too. But that means I can't make changes to hundreds of tests without
also making some other change, or doing something like:

	* testsuite/foo/foo-1.cc: A specific change.
        * testsuite/*: Likewise.

I suppose I can live with the latter, but it would still be nice if
this worked:

	* testsuite/foo/foo-1.cc: A specific change.
        * testsuite/foo/*: Likewise.
        * testsuite/bar/baz/*: Likewise.

i.e. sub-directories below a wildcard prefix.
commit 5cdb6541a49f1ac716a3f1be281c9487d9b198c5
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Nov 27 16:00:58 2020

    gcc-changelog: Add libstdc++-v3/testsuite to wildcard prefixes
    
    This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which
    was one of the original motivations for adding wildcard support in the
    first place:
    https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html
    
    contrib/ChangeLog:
    
            * gcc-changelog/git_commit.py (wildcard_prefixes): Add libstdc++
            testsuite directory.

Comments

Martin Liška Nov. 30, 2020, 9:43 a.m. UTC | #1
On 11/27/20 5:23 PM, Jonathan Wakely wrote:
> This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which
> was one of the original motivations for adding wildcard support in the
> first place:
> https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html
> 
> contrib/ChangeLog:
> 
> 	* gcc-changelog/git_commit.py (wildcard_prefixes): Add libstdc++
> 	testsuite directory.
> 
> OK to push?

Hello.

It's fine, please push it.

> 
> This still doesn't actually meet my needs, because I'd like to be able
> to do:
> 
> 	* testsuite/foo/*: Something for foo tests.
> 	* testsuite/bar/baz/*: Something for baz tests.

Fixed by the patch that I've just pushed.

> 
> So it would be nice if wildcards worked for any directory below a
> wildcard prefix (as long as the directory actually exists).

It works for me now:

$ git show c41c8c19dcc17f319c1306424f8e7de4868ce037 --stat
commit c41c8c19dcc17f319c1306424f8e7de4868ce037
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Nov 30 10:35:05 2020 +0100

     Test me.
     
     libstdc++-v3/ChangeLog:
     
             * doc/html/*: All you need is love.

  libstdc++-v3/doc/html/manual/debug.html | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

$ git gcc-verify -p c41c8c19dcc17f319c1306424f8e7de4868ce037
Checking c41c8c19dcc17f319c1306424f8e7de4868ce037: OK
------ libstdc++-v3/ChangeLog ------
2020-11-30  Martin Liska  <mliska@suse.cz>

	* doc/html/*: All you need is love.

Does it also work for you now? Or does it still have a limitation?

Thanks,
Martin

> 
> It also seems that I can't have a commit where all changes are
> described by a wildcard entry. It seems to require a non-wildcard one
> too. But that means I can't make changes to hundreds of tests without
> also making some other change, or doing something like:
> 
> 	* testsuite/foo/foo-1.cc: A specific change.
>          * testsuite/*: Likewise.
> 
> I suppose I can live with the latter, but it would still be nice if
> this worked:
> 
> 	* testsuite/foo/foo-1.cc: A specific change.
>          * testsuite/foo/*: Likewise.
>          * testsuite/bar/baz/*: Likewise.
> 
> i.e. sub-directories below a wildcard prefix.
> 
>
Jonathan Wakely Nov. 30, 2020, 11:58 a.m. UTC | #2
On Mon, 30 Nov 2020 at 09:44, Martin Liška <mliska@suse.cz> wrote:
>
> On 11/27/20 5:23 PM, Jonathan Wakely wrote:
> > This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which
> > was one of the original motivations for adding wildcard support in the
> > first place:
> > https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html
> >
> > contrib/ChangeLog:
> >
> >       * gcc-changelog/git_commit.py (wildcard_prefixes): Add libstdc++
> >       testsuite directory.
> >
> > OK to push?
>
> Hello.
>
> It's fine, please push it.

Done.

>
> >
> > This still doesn't actually meet my needs, because I'd like to be able
> > to do:
> >
> >       * testsuite/foo/*: Something for foo tests.
> >       * testsuite/bar/baz/*: Something for baz tests.
>
> Fixed by the patch that I've just pushed.
>
> >
> > So it would be nice if wildcards worked for any directory below a
> > wildcard prefix (as long as the directory actually exists).
>
> It works for me now:
>
> $ git show c41c8c19dcc17f319c1306424f8e7de4868ce037 --stat
> commit c41c8c19dcc17f319c1306424f8e7de4868ce037
> Author: Martin Liska <mliska@suse.cz>
> Date:   Mon Nov 30 10:35:05 2020 +0100
>
>      Test me.
>
>      libstdc++-v3/ChangeLog:
>
>              * doc/html/*: All you need is love.
>
>   libstdc++-v3/doc/html/manual/debug.html | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> $ git gcc-verify -p c41c8c19dcc17f319c1306424f8e7de4868ce037
> Checking c41c8c19dcc17f319c1306424f8e7de4868ce037: OK
> ------ libstdc++-v3/ChangeLog ------
> 2020-11-30  Martin Liska  <mliska@suse.cz>
>
>         * doc/html/*: All you need is love.
>
> Does it also work for you now? Or does it still have a limitation?

I can have a commit which only uses wildcards now, thanks.

I still can't use sub-directories with wildcards, but I can live with that.



> Thanks,
> Martin
>
> >
> > It also seems that I can't have a commit where all changes are
> > described by a wildcard entry. It seems to require a non-wildcard one
> > too. But that means I can't make changes to hundreds of tests without
> > also making some other change, or doing something like:
> >
> >       * testsuite/foo/foo-1.cc: A specific change.
> >          * testsuite/*: Likewise.
> >
> > I suppose I can live with the latter, but it would still be nice if
> > this worked:
> >
> >       * testsuite/foo/foo-1.cc: A specific change.
> >          * testsuite/foo/*: Likewise.
> >          * testsuite/bar/baz/*: Likewise.
> >
> > i.e. sub-directories below a wildcard prefix.
> >
> >
>
Martin Liška Nov. 30, 2020, 12:14 p.m. UTC | #3
On 11/30/20 12:58 PM, Jonathan Wakely wrote:
> I can have a commit which only uses wildcards now, thanks.

Good!

> 
> I still can't use sub-directories with wildcards, but I can live with that.

Why? The example I presented did so:

libstdc++-v3/ChangeLog:
	* doc/html/*: All you need is love.

and I modified the following file:
libstdc++-v3/doc/html/manual/debug.html | 3 ++-

Isn't that a sub-directory?

Martin
Jonathan Wakely Nov. 30, 2020, 12:23 p.m. UTC | #4
On Mon, 30 Nov 2020 at 12:14, Martin Liška <mliska@suse.cz> wrote:
>
> On 11/30/20 12:58 PM, Jonathan Wakely wrote:
> > I can have a commit which only uses wildcards now, thanks.
>
> Good!
>
> >
> > I still can't use sub-directories with wildcards, but I can live with that.
>
> Why? The example I presented did so:
>
> libstdc++-v3/ChangeLog:
>         * doc/html/*: All you need is love.
>
> and I modified the following file:
> libstdc++-v3/doc/html/manual/debug.html | 3 ++-
>
> Isn't that a sub-directory?

But libstdc++/doc/html is the entry in the wildcard_prefixes list.
What I mean is using a sub-directory in the changelog:

  * doc/html/manual/*: Love is all you need.

The use case is for subsets of the testsuite. I've added
libstdc++-v3/testsuite to the wildcard_prefixes, which means I can now
do this:

 * testsuite/*: Update all 28_regex tests.

But I would like to do this:

 * testsuite/28_regex/*: Update all tests.

The concrete use case is:

* testsuite/20_util/specialized_algorithms/pstl/*: Add dg-timeout-factor.
* testsuite/25_algorithms/pstl/*: Likewise.
* testsuite/26_numerics/pstl/*: Likewise.
* testsuite/28_regex/*: Likewise.

I'm modifying four specific sub-directories, so I'd like to say that
in the changelog. Currently to allow that I'd have to add every
directory under libstdc++-v3/testsuite to the wildcard_prefixes (which
doesn't scale) or just be vague instead of saying which
sub-directories are affected:

* testsuite/*: Add dg-timeout-factor to most pstl and regex tests.
Martin Liška Nov. 30, 2020, 12:43 p.m. UTC | #5
On 11/30/20 1:23 PM, Jonathan Wakely wrote:
> On Mon, 30 Nov 2020 at 12:14, Martin Liška <mliska@suse.cz> wrote:
>>
>> On 11/30/20 12:58 PM, Jonathan Wakely wrote:
>>> I can have a commit which only uses wildcards now, thanks.
>>
>> Good!
>>
>>>
>>> I still can't use sub-directories with wildcards, but I can live with that.
>>
>> Why? The example I presented did so:
>>
>> libstdc++-v3/ChangeLog:
>>          * doc/html/*: All you need is love.
>>
>> and I modified the following file:
>> libstdc++-v3/doc/html/manual/debug.html | 3 ++-
>>
>> Isn't that a sub-directory?
> 
> But libstdc++/doc/html is the entry in the wildcard_prefixes list.
> What I mean is using a sub-directory in the changelog:
> 
>    * doc/html/manual/*: Love is all you need.
> 
> The use case is for subsets of the testsuite. I've added
> libstdc++-v3/testsuite to the wildcard_prefixes, which means I can now
> do this:
> 
>   * testsuite/*: Update all 28_regex tests.
> 
> But I would like to do this:
> 
>   * testsuite/28_regex/*: Update all tests.

Ahh, got it. Fix with the attached patch I've just pushed.

Hope it's fine now?
Martin

> 
> The concrete use case is:
> 
> * testsuite/20_util/specialized_algorithms/pstl/*: Add dg-timeout-factor.
> * testsuite/25_algorithms/pstl/*: Likewise.
> * testsuite/26_numerics/pstl/*: Likewise.
> * testsuite/28_regex/*: Likewise.
> 
> I'm modifying four specific sub-directories, so I'd like to say that
> in the changelog. Currently to allow that I'd have to add every
> directory under libstdc++-v3/testsuite to the wildcard_prefixes (which
> doesn't scale) or just be vague instead of saying which
> sub-directories are affected:
> 
> * testsuite/*: Add dg-timeout-factor to most pstl and regex tests.
>
Jonathan Wakely Nov. 30, 2020, 12:48 p.m. UTC | #6
On Mon, 30 Nov 2020 at 12:43, Martin Liška <mliska@suse.cz> wrote:
>
> On 11/30/20 1:23 PM, Jonathan Wakely wrote:
> > On Mon, 30 Nov 2020 at 12:14, Martin Liška <mliska@suse.cz> wrote:
> >>
> >> On 11/30/20 12:58 PM, Jonathan Wakely wrote:
> >>> I can have a commit which only uses wildcards now, thanks.
> >>
> >> Good!
> >>
> >>>
> >>> I still can't use sub-directories with wildcards, but I can live with that.
> >>
> >> Why? The example I presented did so:
> >>
> >> libstdc++-v3/ChangeLog:
> >>          * doc/html/*: All you need is love.
> >>
> >> and I modified the following file:
> >> libstdc++-v3/doc/html/manual/debug.html | 3 ++-
> >>
> >> Isn't that a sub-directory?
> >
> > But libstdc++/doc/html is the entry in the wildcard_prefixes list.
> > What I mean is using a sub-directory in the changelog:
> >
> >    * doc/html/manual/*: Love is all you need.
> >
> > The use case is for subsets of the testsuite. I've added
> > libstdc++-v3/testsuite to the wildcard_prefixes, which means I can now
> > do this:
> >
> >   * testsuite/*: Update all 28_regex tests.
> >
> > But I would like to do this:
> >
> >   * testsuite/28_regex/*: Update all tests.
>
> Ahh, got it. Fix with the attached patch I've just pushed.
>
> Hope it's fine now?

Yes, this is perfect, thanks!
diff mbox series

Patch

diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index d0ac23c22aa4..3ebc6fd305e0 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -138,7 +138,8 @@  ignored_prefixes = {
 
 wildcard_prefixes = {
     'gcc/testsuite/',
-    'libstdc++-v3/doc/html/'
+    'libstdc++-v3/doc/html/',
+    'libstdc++-v3/testsuite/'
     }
 
 misc_files = {