[Intel-gfx] [PATCH i-g-t 06/12] meson: Install test-list.txt

Ville Syrjala ville.syrjala at linux.intel.com
Mon Sep 11 17:25:01 UTC 2017


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/generate_testlist.sh | 9 ++++++---
 tests/meson.build          | 9 ++++++++-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/tests/generate_testlist.sh b/tests/generate_testlist.sh
index 6ea78655daca..a0d53e9ff095 100755
--- a/tests/generate_testlist.sh
+++ b/tests/generate_testlist.sh
@@ -1,10 +1,13 @@
 #!/bin/bash
 
-echo TESTLIST > $MESON_BUILD_ROOT/tests/test-list.txt
+OUTPUT=$1
+shift
+
+echo TESTLIST > $OUTPUT
 
 while [[ $# -gt 0 ]] ; do
-	echo $1 >> $MESON_BUILD_ROOT/tests/test-list.txt
+	echo $1 >> $OUTPUT
 	shift
 done
 
-echo END TESTLIST >> $MESON_BUILD_ROOT/tests/test-list.txt
+echo END TESTLIST >> $OUTPUT
diff --git a/tests/meson.build b/tests/meson.build
index 1f98f2a02bb9..37c4c4c24fa5 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -270,7 +270,14 @@ executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
 	   install : true)
 test_progs += 'testdisplay'
 
-run_command('generate_testlist.sh', test_progs)
+pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
+
+gen_testlist = find_program('generate_testlist.sh')
+custom_target('testlist',
+	      output : 'test-list.txt',
+	      command : [ gen_testlist, '@OUTPUT@', test_progs ],
+	      install : true,
+	      install_dir : pkgdatadir)
 
 test_script = find_program('igt_command_line.sh')
 foreach prog : test_progs
-- 
2.13.5



More information about the Intel-gfx mailing list