[igt-dev] [PATCH i-g-t v4 09/11] scripts/test_list.py: add dynamic subtest support

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu May 25 21:04:36 UTC 2023


On 2023-05-25 at 11:05:33 +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> dynamic subtests can't be checked, as --list-subtests won't show
> them. So, we need to change the test check logic to support it,
> as otherwise, spurious warnings will be produced.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>

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

> ---
>  scripts/test_list.py | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/test_list.py b/scripts/test_list.py
> index 21767870b1c1..9744d1cc5e6a 100755
> --- a/scripts/test_list.py
> +++ b/scripts/test_list.py
> @@ -863,10 +863,14 @@ class TestList:
>          if self.filters:
>              print("NOTE: test checks are affected by filters")
>  
> -        doc_subtests = sorted(self.get_subtests()[""])
> +        doc_subtests = set()
>  
> -        for i in range(0, len(doc_subtests)): # pylint: disable=C0200
> -            doc_subtests[i] = re.sub(r'\<[^\>]+\>', r'\\d+', doc_subtests[i])
> +        for subtest in self.get_subtests()[""]:
> +            subtest = "@".join(subtest.split("@")[:3])
> +            subtest = re.sub(r'\<[^\>]+\>', r'\\d+', subtest)
> +            doc_subtests.add(subtest)
> +
> +        doc_subtests = list(sorted(doc_subtests))
>  
>          # Get a list of tests from
>          run_subtests = self.get_testlist()
> -- 
> 2.40.1
> 


More information about the igt-dev mailing list