[PATCH 1/5] data: create new data directory

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Dec 11 09:25:33 UTC 2024


Hi Naladala,
On 2024-11-19 at 13:22:55 +0530, Naladala Ramanaidu wrote:
> From: "Naladala, Ramanaidu" <ramanaidu.naladala at intel.com>

This should be the same as your s-o-b like:

From: Naladala Ramanaidu <ramanaidu.naladala at intel.com>

As for subject, could you improve it a little?

[PATCH 1/5] data: Move PNG images to new data directory

Or even let it be 'data/images'? So it would be:

[PATCH 1/5] data/images: Move PNG images to new directory

Rest looks good.

Regards,
Kamil

> 
> Placing png images inside "tests/" directory seems wrong, as these
> are not source files. These images should ideally be in a directory
> with other non-exec files, so creating a new "data/" directory to
> store such non-exec files.
> 
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
> Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
> ---
>  {tests => data}/1080p-left.png  | Bin
>  {tests => data}/1080p-right.png | Bin
>  data/meson.build                |   9 +++++++++
>  {tests => data}/pass.png        | Bin
>  lib/meson.build                 |   1 +
>  meson.build                     |   2 ++
>  tests/meson.build               |   6 ------
>  7 files changed, 12 insertions(+), 6 deletions(-)
>  rename {tests => data}/1080p-left.png (100%)
>  rename {tests => data}/1080p-right.png (100%)
>  create mode 100644 data/meson.build
>  rename {tests => data}/pass.png (100%)
> 
> diff --git a/tests/1080p-left.png b/data/1080p-left.png
> similarity index 100%
> rename from tests/1080p-left.png
> rename to data/1080p-left.png
> diff --git a/tests/1080p-right.png b/data/1080p-right.png
> similarity index 100%
> rename from tests/1080p-right.png
> rename to data/1080p-right.png
> diff --git a/data/meson.build b/data/meson.build
> new file mode 100644
> index 000000000..415cf9b6b
> --- /dev/null
> +++ b/data/meson.build
> @@ -0,0 +1,9 @@
> +image_files = [
> +  '1080p-left.png',
> +  '1080p-right.png',
> +  'pass.png',
> +]
> +
> +foreach img : image_files
> +      configure_file(output:img, input:img, copy:true)
> +endforeach
> diff --git a/tests/pass.png b/data/pass.png
> similarity index 100%
> rename from tests/pass.png
> rename to data/pass.png
> diff --git a/lib/meson.build b/lib/meson.build
> index 3d459c7a3..6f8f479ff 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -238,6 +238,7 @@ foreach f: lib_sources
>  	    '-DIGT_DATADIR="@0@"'.format(join_paths(prefix, datadir)),
>  	    '-DIGT_SRCDIR="@0@"'.format(srcdir),
>  	    '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]),
> +	    '-DIGT_IMGDIR="@0@"'.format(imgdir),
>  	])
>  
>      lib_intermediates += lib
> diff --git a/meson.build b/meson.build
> index 64f57f232..5ff646825 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -286,6 +286,7 @@ vmwgfxdir = join_paths(libexecdir, 'vmwgfx')
>  mandir = get_option('mandir')
>  pkgconfigdir = join_paths(libdir, 'pkgconfig')
>  python3 = find_program('python3', required : true)
> +imgdir = join_paths(build_root, 'data')
>  
>  if get_option('use_rpath')
>  	# Set up runpath for the test executables towards libigt.so.
> @@ -381,6 +382,7 @@ endif
>  subdir('overlay')
>  subdir('man')
>  subdir('docs')
> +subdir('data')
>  
>  message('Build options')
>  message('=============')
> diff --git a/tests/meson.build b/tests/meson.build
> index 2724c7a9a..61dc7ed34 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -508,11 +508,5 @@ if not meson.is_cross_build()
>  			output : 'gem_stress.testlist')
>  endif
>  
> -image_files = [
> -  '1080p-left.png',
> -  '1080p-right.png',
> -  'pass.png',
> -]
> -install_data(sources : image_files, install_dir : datadir)
>  
>  subdir('intel-ci')
> -- 
> 2.43.0
> 


More information about the igt-dev mailing list