[igt-dev] [PATCH i-g-t 1/1] meson: Install amdgpu tests with their subdirectory
Petri Latvala
petri.latvala at intel.com
Tue Apr 17 13:58:54 UTC 2018
The amdgpu tests in tests/amdgpu got installed directly into
$libexecdir before, but test-list.txt still referred to them as
amdgpu/$testname.
This fixes running scripts/run-tests.sh -l with the install directory
as IGT_TEST_ROOT and, I can imagine, actually running them from
install directory (untested). It also removes one FIXME comment for an
internet point.
Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela at intel.com>
---
tests/amdgpu/meson.build | 19 +++++++++++++++++++
tests/meson.build | 12 ++----------
2 files changed, 21 insertions(+), 10 deletions(-)
create mode 100644 tests/amdgpu/meson.build
diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
new file mode 100644
index 00000000..af5e74c7
--- /dev/null
+++ b/tests/amdgpu/meson.build
@@ -0,0 +1,19 @@
+
+amdgpu_progs = []
+amdgpu_deps = test_deps
+if libdrm_amdgpu.found()
+ amdgpu_progs += [ 'amd_basic',
+ 'amd_cs_nop',
+ 'amd_prime',
+ ]
+ amdgpu_deps += libdrm_amdgpu
+endif
+
+foreach prog : amdgpu_progs
+ test_executables += executable(prog, prog + '.c',
+ dependencies : amdgpu_deps,
+ install_dir : join_paths(libexecdir, 'amdgpu'),
+ install_rpath : rpathdir,
+ install : true)
+ test_progs += join_paths('amdgpu', prog)
+endforeach
diff --git a/tests/meson.build b/tests/meson.build
index 4720dfe2..015afa47 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -223,16 +223,6 @@ test_progs = [
test_deps = [ igt_deps ]
-if libdrm_amdgpu.found()
- # FIXME meson/ninja really doesn't like build targets with paths in them
- test_progs += [
- 'amdgpu/amd_basic',
- 'amdgpu/amd_cs_nop',
- 'amdgpu/amd_prime',
- ]
- test_deps += libdrm_amdgpu
-endif
-
if libdrm_nouveau.found()
test_progs += [
'prime_nv_api',
@@ -309,6 +299,8 @@ executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
install : true)
test_progs += 'testdisplay'
+subdir('amdgpu')
+
gen_testlist = find_program('generate_testlist.sh')
test_list = custom_target('testlist',
output : 'test-list.txt',
--
2.14.1
More information about the igt-dev
mailing list