[igt-dev] [PATCH i-g-t] scripts/test_list.py: fix subtest regex match

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Oct 31 08:46:36 UTC 2023


Hi Mauro,
On 2023-10-30 at 16:43:11 +0100, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> Fix a regression introduced by:
> 	6e3e8e6d7c05 ("scripts/test_list.py: better handle list of tests")

It is fully cited below so here imho it is enough to just write sha1.
btw checkpatch.pl complains about citing format:

ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 0123456789ab ("commit description")'

so this is better:
Fix a regression introduced by commit 6e3e8e6d7c05

> 
> After such change, regex will only do full match, but it needs also to
> consider subtests, if the syntax is just igt at test.
> 
> Fixes: 6e3e8e6d7c05 ("scripts/test_list.py: better handle list of tests")
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  scripts/test_list.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/test_list.py b/scripts/test_list.py
> index 06215242107a..741ec5f4b5b5 100644
> --- a/scripts/test_list.py
> +++ b/scripts/test_list.py
> @@ -476,6 +476,8 @@ class TestList:
>                  test = match.group(1)
>                  subtest = match.group(2)
>                  test_name = f"{test}{subtest}"
> +                if not test_name.endswith("$"):
> +                    test_name += r"(\@.*)?$"
>  
>                  if match_type in match_type_regex:
>                      testlist[name].append(re.compile(test_name, flags))
> -- 
> 2.41.0
> 


More information about the igt-dev mailing list