Message ID | 1427784696.8718.6.camel@jlahtine-mobl1 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 31 March 2015 at 07:51, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote: > Install the test programs by default so that they can be packaged. Patch looks good, but I think we still need to consider how to make sure the tests continue to work when not installed. One solution might be to make the installation of tests a configure option so that the data path can be set accordingly. > > Tested with the testdisplay test so that it still runs after the > modifications as it depends on a data file to be present. > > 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. > > v4: > - Fixed commit message. > > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Thomas Wood <thomas.wood@intel.com> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@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 = \ > -- > 1.9.3
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 = \
Install the test programs by default so that they can be packaged. Tested with the testdisplay test so that it still runs after the modifications as it depends on a data file to be present. 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. v4: - Fixed commit message. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> --- tests/Makefile.am | 21 ++++++++++++++++++--- tests/Makefile.sources | 16 ++++++++++++++-- 2 files changed, 32 insertions(+), 5 deletions(-)