[PATCH i-g-t v2 1/4] scripts/igt_doc.py: fix intelci testlist generation for complex cases

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon Feb 26 10:54:04 UTC 2024


Hi Mauro,
On 2024-02-22 at 12:45:25 +0100, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> The most complex case is when a test is included or block listed, via
> GPU and "Excluded GPU platform" fields, as the same test might be
> on both lists.
> 
> Currently, the handling logic doesn't go though all GPUs, which ends
> supressing tests from testlists if the GPU is not mentioned.
> 
> Fix it, while simplifying the logic.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>

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

> ---
>  scripts/igt_doc.py | 26 ++++++++------------------
>  1 file changed, 8 insertions(+), 18 deletions(-)
> 
> diff --git a/scripts/igt_doc.py b/scripts/igt_doc.py
> index 3a45371a27e7..7404e3d0934c 100755
> --- a/scripts/igt_doc.py
> +++ b/scripts/igt_doc.py
> @@ -163,36 +163,26 @@ class IgtTestList(TestList):
>                              testlists[driver][gpu][run_type].add(subname)
>                          continue
>  
> -                    default_gpu_value = True
> -
>                      # If GPU field is used, default is to block list
> +                    default_gpu_value = True
>                      for gpu, value in gpus.items():
>                          if value:
>                              default_gpu_value = False
>                              break
>  
> -                    for gpu, value in gpus.items():
> +                    for gpu in gpu_set:
> +                        value = tests_per_list[driver][run_type][subname].get(gpu, default_gpu_value)
> +
> +                        if not value:
> +                            continue
> +
>                          if gpu not in testlists[driver]:
>                              testlists[driver][gpu] = {}
>  
>                          if run_type not in testlists[driver][gpu]:
>                              testlists[driver][gpu][run_type] = set()
>  
> -                        value = default_gpu_value
> -                        if gpu in tests_per_list[driver][run_type][subname]:
> -                            value = tests_per_list[driver][run_type][subname]
> -
> -                        if value:
> -                            testlists[driver][gpu][run_type].add(subname)
> -
> -                    if default_gpu_value:
> -                        if default_gpu not in testlists[driver]:
> -                            testlists[driver][default_gpu] = {}
> -
> -                        if run_type not in testlists[driver][default_gpu]:
> -                            testlists[driver][default_gpu][run_type] = set()
> -
> -                        testlists[driver][default_gpu][run_type].add(subname)
> +                        testlists[driver][gpu][run_type].add(subname)
>  
>          if len(gpu_set) == 0:
>              gpu_set.add(default_gpu)
> -- 
> 2.43.2
> 


More information about the igt-dev mailing list