[igt-dev] [PATCH i-g-t 09/11] testplan/meson.build: Validate documentation at build time

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


On 2023-03-27 at 15:31:53 +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> If the tests are build too, check if the documentation match
> the name of the tests.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>

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

> ---
>  docs/testplan/meson.build | 8 ++++++--
>  meson.build               | 1 +
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
> index fee568868167..d1ad6ea0461b 100644
> --- a/docs/testplan/meson.build
> +++ b/docs/testplan/meson.build
> @@ -8,12 +8,16 @@ stylesheet = join_paths(meson.current_source_dir(), 'testplan.css')
>  
>  xe_test_config = join_paths(source_root, 'tests', 'xe', 'xe_test_config.json')
>  
> -if not build_tests
> +check_testlist = ''
> +if build_tests
> +	# Check if documentation matches the actual tests
> +	check_testlist = [ '--check-testlist', '--igt-build-path', build_root ]
> +else
>  	test_executables = []
>  endif
>  
>  test_dict = { 'xe_tests':
> -		{ 'input': xe_test_config, 'extra_args': [] }
> +		{ 'input': xe_test_config, 'extra_args': check_testlist }
>  	    }
>  
>  foreach testplan, fields: test_dict
> diff --git a/meson.build b/meson.build
> index 7360634fe199..bef590f465dc 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -15,6 +15,7 @@ endif
>  
>  # meson.source_root is marked as a future-deprecated feature
>  source_root = meson.current_source_dir()
> +build_root = meson.current_build_dir()
>  
>  cc = meson.get_compiler('c')
>  
> -- 
> 2.39.2
> 


More information about the igt-dev mailing list