[igt-dev] [PATCH i-g-t v3] testplan/meson.build: only run igt_runner if it is compiled

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Apr 4 12:21:57 UTC 2023


On 2023-04-04 at 13:19:43 +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab at kernel.org>
> 
> While the runner is built by default, if jsonc is not found, it
> won't be build. This will cause the documentation validation test
> to cause the build to fail.
> 
> Prevent that by adding an extra check if jsonc is found, as this
> is the same condition that it is used to build igt_runner.
> 
> While here, also ensure that igt_doc.py will depend on having the
> igt_runner already compiled, when the --check option is used.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>

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

> 
> ---
> 
> v3:
>   - don't bail out if tests aren't built
> v2:
>   - add a dependency for the runner binary when --check option is
>     used.
> ---
>  docs/testplan/meson.build | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build
> index 4c67ec42fc69..ea9f6eeb7038 100644
> --- a/docs/testplan/meson.build
> +++ b/docs/testplan/meson.build
> @@ -10,10 +10,14 @@ xe_test_config = join_paths(source_root, 'tests', 'xe', 'xe_test_config.json')
>  
>  check_testlist = []
>  if build_tests
> -	# Check if documentation matches the actual tests
> -	check_testlist = [ '--check-testlist', '--igt-build-path', build_root ]
> +	doc_dependencies = test_executables
> +	if jsonc.found()
> +		# Check if documentation matches the actual tests
> +		check_testlist = [ '--check-testlist', '--igt-build-path', build_root ]
> +		doc_dependencies += runner
> +	endif
>  else
> -	test_executables = []
> +	doc_dependencies = []
>  endif
>  
>  test_dict = { 'xe_tests':
> @@ -24,7 +28,7 @@ foreach testplan, fields: test_dict
>  	rst = custom_target(testplan + '.rst',
>  			    build_by_default : true,
>  			    command : [ igt_doc_script, '--config', '@INPUT@', '--rest', '@OUTPUT@' ] + fields['extra_args'],
> -			    depends : test_executables,
> +			    depends : doc_dependencies,
>  			    input : fields['input'],
>  			    output : testplan + '.rst'
>  			   )
> -- 
> 2.39.2
> 


More information about the igt-dev mailing list