[igt-dev] [PATCH i-g-t v3 2/7] tests/v3d: Move V3D tests to their own folder

Maíra Canal mcanal at igalia.com
Tue Nov 29 18:40:33 UTC 2022


With the introduction of new tests to V3D, in order to avoid polluting
the main tests folder, move the V3D tests to a separate folder.
Moreover, create a subdir "v3d" to install the V3D-specific tests.

Reviewed-by: Melissa Wen <mwen at igalia.com>
Signed-off-by: Maíra Canal <mcanal at igalia.com>
---
 meson.build                         |  8 ++++++++
 tests/meson.build                   |  5 ++---
 tests/v3d/meson.build               | 14 ++++++++++++++
 tests/{ => v3d}/v3d_get_bo_offset.c |  0
 tests/{ => v3d}/v3d_get_param.c     |  0
 tests/{ => v3d}/v3d_mmap.c          |  0
 tests/v3d_ci/v3d.testlist           | 12 ++++++------
 7 files changed, 30 insertions(+), 9 deletions(-)
 create mode 100644 tests/v3d/meson.build
 rename tests/{ => v3d}/v3d_get_bo_offset.c (100%)
 rename tests/{ => v3d}/v3d_get_param.c (100%)
 rename tests/{ => v3d}/v3d_mmap.c (100%)

diff --git a/meson.build b/meson.build
index 3e937f5a..709c7a6c 100644
--- a/meson.build
+++ b/meson.build
@@ -260,6 +260,7 @@ includedir = get_option('includedir')
 libdir = get_option('libdir')
 libexecdir = join_paths(get_option('libexecdir'), 'igt-gpu-tools')
 amdgpudir = join_paths(libexecdir, 'amdgpu')
+v3ddir = join_paths(libexecdir, 'v3d')
 mandir = get_option('mandir')
 pkgconfigdir = join_paths(libdir, 'pkgconfig')
 python3 = find_program('python3', required : true)
@@ -295,10 +296,17 @@ if get_option('use_rpath')
 		amdgpudir_rpathdir = join_paths(amdgpudir_rpathdir, '..')
 	endforeach
 	amdgpudir_rpathdir = join_paths(amdgpudir_rpathdir, libdir)
+
+	v3d_rpathdir = '$ORIGIN'
+	foreach p : v3ddir.split('/')
+		v3d_rpathdir = join_paths(v3d_rpathdir, '..')
+	endforeach
+	v3d_rpathdir = join_paths(v3d_rpathdir, libdir)
 else
 	bindir_rpathdir = ''
 	libexecdir_rpathdir = ''
 	amdgpudir_rpathdir = ''
+	v3d_rpathdir = ''
 endif
 
 subdir('lib')
diff --git a/tests/meson.build b/tests/meson.build
index 12e53e0b..172f2e9b 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -80,9 +80,6 @@ test_progs = [
 	'syncobj_timeline',
 	'template',
 	'tools_test',
-	'v3d_get_bo_offset',
-	'v3d_get_param',
-	'v3d_mmap',
 	'vc4_create_bo',
 	'vc4_dmabuf_poll',
 	'vc4_label_bo',
@@ -453,6 +450,8 @@ test_list += 'sw_sync'
 
 subdir('amdgpu')
 
+subdir('v3d')
+
 gen_testlist = find_program('generate_testlist.sh')
 test_list_target = custom_target('testlist',
 	      output : 'test-list.txt',
diff --git a/tests/v3d/meson.build b/tests/v3d/meson.build
new file mode 100644
index 00000000..45f73a88
--- /dev/null
+++ b/tests/v3d/meson.build
@@ -0,0 +1,14 @@
+v3d_progs = [
+	'v3d_get_bo_offset',
+	'v3d_get_param',
+	'v3d_mmap',
+]
+
+foreach prog : v3d_progs
+	test_executables += executable(prog, prog + '.c',
+				       dependencies : test_deps,
+				       install_dir : v3ddir,
+				       install_rpath : v3d_rpathdir,
+				       install : true)
+	test_list += join_paths('v3d', prog)
+endforeach
diff --git a/tests/v3d_get_bo_offset.c b/tests/v3d/v3d_get_bo_offset.c
similarity index 100%
rename from tests/v3d_get_bo_offset.c
rename to tests/v3d/v3d_get_bo_offset.c
diff --git a/tests/v3d_get_param.c b/tests/v3d/v3d_get_param.c
similarity index 100%
rename from tests/v3d_get_param.c
rename to tests/v3d/v3d_get_param.c
diff --git a/tests/v3d_mmap.c b/tests/v3d/v3d_mmap.c
similarity index 100%
rename from tests/v3d_mmap.c
rename to tests/v3d/v3d_mmap.c
diff --git a/tests/v3d_ci/v3d.testlist b/tests/v3d_ci/v3d.testlist
index b55e8e57..442fd731 100644
--- a/tests/v3d_ci/v3d.testlist
+++ b/tests/v3d_ci/v3d.testlist
@@ -1,6 +1,6 @@
-igt at v3d_get_bo_offset@create-get-offsets
-igt at v3d_get_bo_offset@get-bad-handle
-igt at v3d_get_param@base-params
-igt at v3d_get_param@get-bad-param
-igt at v3d_get_param@get-bad-flags
-igt at v3d_mmap@mmap-bad-handle
+igt at v3d/v3d_get_bo_offset at create-get-offsets
+igt at v3d/v3d_get_bo_offset at get-bad-handle
+igt at v3d/v3d_get_param at base-params
+igt at v3d/v3d_get_param at get-bad-param
+igt at v3d/v3d_get_param at get-bad-flags
+igt at v3d/v3d_mmap at mmap-bad-handle
-- 
2.38.1



More information about the igt-dev mailing list