[Intel-gfx] [PATCH i-g-t v3] tests: install test programs to libexec

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Mar 27 01:56:25 PDT 2015


On pe, 2015-03-27 at 10:51 +0200, Joonas Lahtinen wrote:
> Install the test programs by default so that they can be packaged.
> 
> Tested the testdisplay test so that it still runs after modifications,
> as it depends on script data.
> 

Duh, "s/depends on script data/depends on a data file/".

Also, added Chris.

Regards, Joonas

> Packaging is useful when building a complete software stack for a
> DUT from scratch. This should bring us closer to achieving a
> built-from-scratch testing workflow.
> 
> Package maintainers can always decide to ignore the installed files.
> 
> v2:
> - Install more tests including scripts and their data
> 
> v3:
> - Add clarification to commit message about why we do this.
>   (Chris Wilson & Thomas Wood)
> - Change libexec into pkglibexec to comply to standard.
>   (Thomas Wood)
> - Do not install $(common_files). (Thomas Wood)
> - Make it really obvious the installed files are tests by using
>   tests directory name to avoid any confusion with packagers.
> 
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Thomas Wood <thomas.wood at intel.com>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> ---
>  tests/Makefile.am      | 21 ++++++++++++++++++---
>  tests/Makefile.sources | 16 ++++++++++++++--
>  2 files changed, 32 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index f45c6c9..5cce450 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -27,8 +27,23 @@ multi-tests.txt: Makefile.sources
>  	@echo ${multi_kernel_tests} >> $@
>  	@echo END TESTLIST >> $@
>  
> -EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG)
> -EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) $(scripts) $(IMAGES) $(common_files)
> +igt_tests_bin_PROGRAMS += \
> +	$(TESTS_progs) \
> +	$(TESTS_progs_M) \
> +	$(NULL)
> +
> +igt_tests_bin_SCRIPTS += \
> +	$(TESTS_scripts) \
> +	$(TESTS_scripts_M) \
> +	$(scripts) \
> +	$(NULL)
> +
> +igt_tests_data_DATA += \
> +	$(IMAGES) \
> +	$(NULL)
> +
> +EXTRA_PROGRAMS = $(HANG)
> +EXTRA_DIST = $(common_files)
>  
>  CLEANFILES = $(EXTRA_PROGRAMS) single-tests.txt multi-tests.txt
>  
> @@ -36,7 +51,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS)\
>  	-I$(srcdir)/.. \
>  	-I$(srcdir)/../lib \
>  	-include "$(srcdir)/../lib/check-ndebug.h" \
> -	-DIGT_DATADIR=\""$(abs_srcdir)"\" \
> +	-DIGT_DATADIR=\""$(igt_tests_datadir)"\" \
>  	$(LIBUNWIND_CFLAGS) \
>  	$(NULL)
>  
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 0a974a6..e8297dd 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -1,10 +1,22 @@
> +igt_tests_bindir = $(pkglibexecdir)/tests
> +igt_tests_datadir = $(pkgdatadir)/tests
> +
>  noinst_PROGRAMS = \
> +	$(HANG) \
> +	$(TESTS_testsuite) \
> +	$(NULL)
> +
> +igt_tests_bin_PROGRAMS = \
>  	gem_alive \
>  	gem_stress \
>  	$(TESTS_progs) \
>  	$(TESTS_progs_M) \
> -	$(HANG) \
> -	$(TESTS_testsuite) \
> +	$(NULL)
> +
> +igt_tests_bin_SCRIPTS = \
> +	$(NULL)
> +
> +igt_tests_data_DATA = \
>  	$(NULL)
>  
>  NOUVEAU_TESTS_M = \




More information about the Intel-gfx mailing list