[igt-dev] [PATCH i-g-t v4 07/11] scripts/test_list.py: don't be greedy while matching data from testlists

Kamil Konieczny kamil.konieczny at linux.intel.com
Fri Sep 8 17:49:59 UTC 2023


Hi Mauro,
On 2023-09-08 at 10:27:43 +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> Testlist regexes are not greedy: despite not containing a $ at the
> end, they stop parsing at the end of string.
> 
> Honour that, doing the same logic as IGT runner does.
> 
> 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 ff4b2d8d76ae..c9073cc0305f 100644
> --- a/scripts/test_list.py
> +++ b/scripts/test_list.py
> @@ -457,6 +457,8 @@ class TestList:
>                  if match:
>                      test = match.group(1)
>                      subtest = match.group(2)
> +                    if not subtest.endswith("$"):
> +                        subtest += r"(\@.*)?$"
>                      testlist[name].append(re.compile(f"{test}{subtest}"))
>  
>      def __filter_subtest(self, test, subtest, field_not_found_value):
> -- 
> 2.41.0
> 


More information about the igt-dev mailing list