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

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Mar 27 00:05:15 PDT 2015


On to, 2015-03-26 at 17:29 +0000, Thomas Wood wrote:
> On 26 March 2015 at 16:05, Joonas Lahtinen
> <joonas.lahtinen at linux.intel.com> wrote:
> > Install the test programs by default so that they can be packaged.
> 
> Could you also explain why the tests should be packaged?
> 

Explained in previous e-mail.

> 
> >
> > v2:
> > - Install more tests including scripts and their data
> >
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > ---
> >  tests/Makefile.am      | 22 +++++++++++++++++++---
> >  tests/Makefile.sources | 10 ++++++++--
> >  2 files changed, 27 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/Makefile.am b/tests/Makefile.am
> > index 0ae2541..12675b5 100644
> > --- a/tests/Makefile.am
> > +++ b/tests/Makefile.am
> > @@ -27,10 +27,26 @@ 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)
> > +libexec_PROGRAMS += \
> 
> Since there are a lot of test programs, it would probably be nicer to
> install them into pkglibexecdir.
> 

My bad, as in my build they went into their own subdirectory already,
could be the build QA checker was doing some fixing for me unnoticed.

> 
> > +       $(TESTS_progs) \
> > +       $(TESTS_progs_M) \
> > +       $(HANG) \
> 
> The tests listed in $(HANG) are not part of the normal test suite
> (they are not included in the generated test lists). However, if you
> want to install all built programs, gem_alive and gem_stress also need
> to be included.
> 

Ack.

> 
> > +       $(NULL)
> > +
> > +libexec_SCRIPTS += \
> > +       $(TESTS_scripts) \
> > +       $(TESTS_scripts_M) \
> > +       $(scripts) \
> > +       $(NULL)
> > +
> > +# We do want the data to be at the same directory as executables.
> 
> The file path in the executables is defined by IGT_DATADIR, which
> currently points to the tests source directory (except in the Android
> build) and therefore still needs updating.
> 
> 
> > +igt_tests_datadir = $(libexecdir)
> 
> The data files should be installed in pkgdatadir.

Ack. I was under some kind of impression that there was an assumption
for more files to be present for the tests to run, but obviously not.

> 
> 
> > +igt_tests_data_DATA = \
> > +       $(IMAGES) \
> > +       $(common_files) \
> 
> $(common_files) is actually a c file, so it shouldn't be installed as data.
> 

Ack. Rerolling the patch with changes.

Regards, Joonas
> 
> > +       $(NULL)
> >
> > -CLEANFILES = $(EXTRA_PROGRAMS) single-tests.txt multi-tests.txt
> > +CLEANFILES = single-tests.txt multi-tests.txt
> >
> >  AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \
> >         -I$(srcdir)/.. \
> > diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> > index 0a974a6..8d4e243 100644
> > --- a/tests/Makefile.sources
> > +++ b/tests/Makefile.sources
> > @@ -1,12 +1,18 @@
> >  noinst_PROGRAMS = \
> >         gem_alive \
> >         gem_stress \
> > -       $(TESTS_progs) \
> > -       $(TESTS_progs_M) \
> >         $(HANG) \
> >         $(TESTS_testsuite) \
> >         $(NULL)
> >
> > +libexec_PROGRAMS = \
> > +       $(TESTS_progs) \
> > +       $(TESTS_progs_M) \
> > +       $(NULL)
> > +
> > +libexec_SCRIPTS = \
> > +       $(NULL)
> > +
> >  NOUVEAU_TESTS_M = \
> >         prime_nv_api \
> >         prime_nv_pcopy \
> > --
> > 1.9.3




More information about the Intel-gfx mailing list