[igt-dev] [PATCH i-g-t 07/11] scripts/test_list.py: better handle documentation validation issues

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Mar 29 17:53:25 UTC 2023


On 2023-03-27 at 15:31:51 +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> Produce warnings and exit with an error when test plan is out of sync.
> 
> 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, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/scripts/test_list.py b/scripts/test_list.py
> index 73c1794caec5..7d35deda3329 100755
> --- a/scripts/test_list.py
> +++ b/scripts/test_list.py
> @@ -803,16 +803,14 @@ class TestList:
>                  run_missing.append(run_test)
>  
>          if doc_uneeded:
> -            print("Unused documentation")
>              for test_name in doc_uneeded:
> -                print(test_name)
> +                print(f"Warning: Documented {test_name} doesn't exist on source files")
>  
>          if run_missing:
> -            if doc_uneeded:
> -                print()
> -            print("Missing documentation")
>              for test_name in run_missing:
> -                print(test_name)
> +                print(f'Warning: Missing documentation for {test_name}')
> +        if doc_uneeded or run_missing:
> +            sys.exit(1)
>  
>      #
>      # File handling methods
> -- 
> 2.39.2
> 


More information about the igt-dev mailing list