Message ID | 1427385927.25724.1.camel@jlahtine-mobl1 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Mar 26, 2015 at 06:05:27PM +0200, Joonas Lahtinen wrote: > Install the test programs by default so that they can be packaged. > > v2: > - Install more tests including scripts and their data Packaged by whom? Developers should be using git (otherwise how will they feed back the patches they generate?), so if you are expecting users to be running them, please no. Instead write a diagnostic tool. -Chris
On 26 March 2015 at 16:05, Joonas Lahtinen <joonas.lahtinen@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? > > v2: > - Install more tests including scripts and their data > > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@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. > + $(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. > + $(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. > +igt_tests_data_DATA = \ > + $(IMAGES) \ > + $(common_files) \ $(common_files) is actually a c file, so it shouldn't be installed as data. > + $(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
Hi, On to, 2015-03-26 at 16:14 +0000, Chris Wilson wrote: > On Thu, Mar 26, 2015 at 06:05:27PM +0200, Joonas Lahtinen wrote: > > Install the test programs by default so that they can be packaged. > > > > v2: > > - Install more tests including scripts and their data > > Packaged by whom? > > Developers should be using git (otherwise how will they feed back the > patches they generate?), so if you are expecting users to be running them, > please no. Instead write a diagnostic tool. I do not expect users to be running them. Installing them properly makes it much easier to create a build-from-scratch setup including i-g-t. This way for example with Yocto, which I myself use, a software stack can be built in complete isolation from development machine stack and installed into the DUT for inspection (including source-level debugging with gdb). I do not see why the i-g-t tests would be deliberately made not to package, when they are used for regression testing. > -Chris >
On to, 2015-03-26 at 17:29 +0000, Thomas Wood wrote: > On 26 March 2015 at 16:05, Joonas Lahtinen > <joonas.lahtinen@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@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
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 += \ + $(TESTS_progs) \ + $(TESTS_progs_M) \ + $(HANG) \ + $(NULL) + +libexec_SCRIPTS += \ + $(TESTS_scripts) \ + $(TESTS_scripts_M) \ + $(scripts) \ + $(NULL) + +# We do want the data to be at the same directory as executables. +igt_tests_datadir = $(libexecdir) +igt_tests_data_DATA = \ + $(IMAGES) \ + $(common_files) \ + $(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 \
Install the test programs by default so that they can be packaged. v2: - Install more tests including scripts and their data Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> --- tests/Makefile.am | 22 +++++++++++++++++++--- tests/Makefile.sources | 10 ++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-)