tests: ensure scripts and data are included in the distribution
PATCH 1/2 tests: ensure scripts and data are included in the distribution
Prefix the test scripts and data variables with dist_ to ensure they are included in the distribution.
--- tests/Makefile.am | 4 ++-- tests/Makefile.sources | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-)
tests/Makefile.am +2 -2
@@ -32,13 +32,13 @@ igt_tests_bin_PROGRAMS += \ $(TESTS_progs_M) \ $(NULL) -igt_tests_bin_SCRIPTS += \ +dist_igt_tests_bin_SCRIPTS = \ $(TESTS_scripts) \ $(TESTS_scripts_M) \ $(scripts) \ $(NULL) -igt_tests_data_DATA += \ +dist_igt_tests_data_DATA = \ $(IMAGES) \ $(NULL)
tests/Makefile.sources +0 -6
@@ -13,12 +13,6 @@ igt_tests_bin_PROGRAMS = \ $(TESTS_progs_M) \ $(NULL) -igt_tests_bin_SCRIPTS = \ - $(NULL) - -igt_tests_data_DATA = \ - $(NULL) - NOUVEAU_TESTS_M = \ prime_nv_api \ prime_nv_pcopy \
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 tests: use standard install prefix for programs, scripts and data
Use the pkglibexec and pkgdata prefixes rather than setting bindir and datadir. This also removes the extra 'tests' directory from within the package libexec and data directories.
--- tests/Makefile.am | 15 +++++++++++---- tests/Makefile.sources | 15 --------------- 2 files changed, 11 insertions(+), 19 deletions(-)
tests/Makefile.am +11 -4
@@ -27,18 +27,25 @@ multi-tests.txt: Makefile.sources @echo ${multi_kernel_tests} >> $@ @echo END TESTLIST >> $@ -igt_tests_bin_PROGRAMS += \ +noinst_PROGRAMS = \ + $(HANG) \ + $(TESTS_testsuite) \ + $(NULL) + +pkglibexec_PROGRAMS = \ + gem_alive \ + gem_stress \ $(TESTS_progs) \ $(TESTS_progs_M) \ $(NULL) -dist_igt_tests_bin_SCRIPTS = \ +dist_pkglibexec_SCRIPTS = \ $(TESTS_scripts) \ $(TESTS_scripts_M) \ $(scripts) \ $(NULL) -dist_igt_tests_data_DATA = \ +dist_pkgdata_DATA = \ $(IMAGES) \ $(NULL)
@@ -52,7 +59,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS)\ -I$(srcdir)/../lib \ -include "$(srcdir)/../lib/check-ndebug.h" \ -DIGT_SRCDIR=\""$(abs_srcdir)"\" \ - -DIGT_DATADIR=\""$(igt_tests_datadir)"\" \ + -DIGT_DATADIR=\""$(pkgdatadir)"\" \ $(LIBUNWIND_CFLAGS) \ $(NULL)
tests/Makefile.sources +0 -15
@@ -1,18 +1,3 @@ -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) \ - $(NULL) - NOUVEAU_TESTS_M = \ prime_nv_api \ prime_nv_pcopy \
Signature · 6 lines
2.1.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 2/2] tests: use standard install prefix for programs, scripts and data
Quoted 21 lines · Thomas Wood
Use the pkglibexec and pkgdata prefixes rather than setting bindir and datadir. This also removes the extra 'tests' directory from within the package libexec and data directories.
Cc Joonas Lahtinen <[email protected]>Signed-off-by Thomas Wood <[email protected]>--- tests/Makefile.am | 15 +++++++++++---- tests/Makefile.sources | 15 --------------- 2 files changed, 11 insertions(+), 19 deletions(-)tests/Makefile.am +1
-1@@ -27,18 +27,25 @@ multi-tests.txt: Makefile.sources @echo ${multi_kernel_tests} >> $@ @echo END TESTLIST >> $@ -igt_tests_bin_PROGRAMS += \ +noinst_PROGRAMS = \
tests/Makefile.am multi-tests.txt: Makefile.sources · line 40
Quoted 10 lines
tests/Makefile.am +7
-0+ $(HANG) \ + $(TESTS_testsuite) \ + $(NULL) + +pkglibexec_PROGRAMS = \ + gem_alive \ + gem_stress \ $(TESTS_progs) \ $(TESTS_progs_M) \ $(NULL)
Reasoning for the tests directory was that if the tests just sit under pkglibexec, they might be mistaken for tools (as the i-g-t package name suggests) by packagers or really anybody.
If it's so important not to have the tests directory, I'd rather suffix all the programs with "_test" during build. It would cause some cascading changes too, so why do you want to get rid of the tests directory in the first place?
tests/Makefile.am multi-tests.txt: Makefile.sources · line 47
Quoted 8 lines
tests/Makefile.am +1
-1-dist_igt_tests_bin_SCRIPTS = \ +dist_pkglibexec_SCRIPTS = \ $(TESTS_scripts) \ $(TESTS_scripts_M) \ $(scripts) \ $(NULL)
This one was giving me complaints with automake 1.14.1 that SCRIPTS don't belong straight to pkglibexec, so this would have to be kept indirect like it is, be it with tests directory or not.
Quoted 27 lines
tests/Makefile.am +2
-2-dist_igt_tests_data_DATA = \ +dist_pkgdata_DATA = \ $(IMAGES) \ $(NULL)@@ -52,7 +59,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS)\ -I$(srcdir)/../lib \ -include "$(srcdir)/../lib/check-ndebug.h" \ -DIGT_SRCDIR=\""$(abs_srcdir)"\" \ - -DIGT_DATADIR=\""$(igt_tests_datadir)"\" \ + -DIGT_DATADIR=\""$(pkgdatadir)"\" \ $(LIBUNWIND_CFLAGS) \ $(NULL)tests/Makefile.sources +0
-8@@ -1,18 +1,3 @@ -igt_tests_bindir = $(pkglibexecdir)/tests -igt_tests_datadir = $(pkgdatadir)/tests - -noinst_PROGRAMS = \ - $(HANG) \ - $(TESTS_testsuite) \ - $(NULL) -
tests/Makefile.sources line 3
Quoted 10 lines
tests/Makefile.sources +0
-7-igt_tests_bin_PROGRAMS = \ - gem_alive \ - gem_stress \ - $(TESTS_progs) \ - $(TESTS_progs_M) \ - $(NULL) - NOUVEAU_TESTS_M = \ prime_nv_api \ prime_nv_pcopy \
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 2/2] tests: use standard install prefix for programs, scripts and data
Quoted 37 lines · Joonas Lahtinen
Quoted 21 lines · Thomas Wood
Use the pkglibexec and pkgdata prefixes rather than setting bindir and datadir. This also removes the extra 'tests' directory from within the package libexec and data directories.
Cc Joonas Lahtinen <[email protected]>Signed-off-by Thomas Wood <[email protected]>--- tests/Makefile.am | 15 +++++++++++---- tests/Makefile.sources | 15 --------------- 2 files changed, 11 insertions(+), 19 deletions(-)tests/Makefile.am +1
-1@@ -27,18 +27,25 @@ multi-tests.txt: Makefile.sources @echo ${multi_kernel_tests} >> $@ @echo END TESTLIST >> $@ -igt_tests_bin_PROGRAMS += \ +noinst_PROGRAMS = \tests/Makefile.am multi-tests.txt: Makefile.sources · line 40
Quoted 10 lines
tests/Makefile.am +7
-0+ $(HANG) \ + $(TESTS_testsuite) \ + $(NULL) + +pkglibexec_PROGRAMS = \ + gem_alive \ + gem_stress \ $(TESTS_progs) \ $(TESTS_progs_M) \ $(NULL)Reasoning for the tests directory was that if the tests just sit under pkglibexec, they might be mistaken for tools (as the i-g-t package name suggests) by packagers or really anybody.
Quoted 4 lines
If it's so important not to have the tests directory, I'd rather suffix all the programs with "
_test" during build. It would cause some cascading changes too, so why do you want to get rid of the tests directory in the first place?
Imo libexec is a sufficient hint that this is internal stuff that we don't need to add a prefix or subdir.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH i-g-t 2/2] tests: use standard install prefix for programs, scripts and data
In reply to Joonas LahtinenQuoted 20 lines · Joonas Lahtinen
Quoted 19 lines · Thomas Wood
Use the pkglibexec and pkgdata prefixes rather than setting bindir and datadir. This also removes the extra 'tests' directory from within the package libexec and data directories.
Cc Joonas Lahtinen <[email protected]>Signed-off-by Thomas Wood <[email protected]>--- tests/Makefile.am | 15 +++++++++++---- tests/Makefile.sources | 15 --------------- 2 files changed, 11 insertions(+), 19 deletions(-)tests/Makefile.am +0
-0@@ -27,18 +27,25 @@ multi-tests.txt: Makefile.sources @echo ${multi_kernel_tests} >> $@ @echo END TESTLIST >> $@
Quoted 16 lines
tests/Makefile.am multi-tests.txt: Makefile.sources · line 40
Quoted 12 lines
tests/Makefile.am +8
-1-igt_tests_bin_PROGRAMS += \ +noinst_PROGRAMS = \ + $(HANG) \ + $(TESTS_testsuite) \ + $(NULL) + +pkglibexec_PROGRAMS = \ + gem_alive \ + gem_stress \ $(TESTS_progs) \ $(TESTS_progs_M) \ $(NULL)Reasoning for the tests directory was that if the tests just sit under pkglibexec, they might be mistaken for tools (as the i-g-t package name suggests) by packagers or really anybody.
I think pklibexec is sufficient since user tools ought to be install in bin anyway. The test list should also be installed in pkgdatadir to identify the test binaries.
Quoted 7 lines
If it's so important not to have the tests directory, I'd rather suffix all the programs with "
_test" during build. It would cause some cascading changes too, so why do you want to get rid of the tests directory in the first place?Quoted 1 line
Quoted 11 lines
tests/Makefile.am multi-tests.txt: Makefile.sources · line 46
Quoted 7 lines
tests/Makefile.am +1
-1-dist_igt_tests_bin_SCRIPTS = \ +dist_pkglibexec_SCRIPTS = \ $(TESTS_scripts) \ $(TESTS_scripts_M) \ $(scripts) \ $(NULL)This one was giving me complaints with automake 1.14.1 that SCRIPTS don't belong straight to pkglibexec, so this would have to be kept indirect like it is, be it with tests directory or not.
I also have automake 1.14.1 and it doesn't seem to complain. Does it prevent automake from completing successfully?
Quoted 30 lines
Quoted 30 lines
tests/Makefile.am +2
-2-dist_igt_tests_data_DATA = \ +dist_pkgdata_DATA = \ $(IMAGES) \ $(NULL)@@ -52,7 +59,7 @@ AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) $(DEBUG_CFLAGS)\ -I$(srcdir)/../lib \ -include "$(srcdir)/../lib/check-ndebug.h" \ -DIGT_SRCDIR=\""$(abs_srcdir)"\" \ - -DIGT_DATADIR=\""$(igt_tests_datadir)"\" \ + -DIGT_DATADIR=\""$(pkgdatadir)"\" \ $(LIBUNWIND_CFLAGS) \ $(NULL)tests/Makefile.sources +0
-10@@ -1,18 +1,3 @@ -igt_tests_bindir = $(pkglibexecdir)/tests -igt_tests_datadir = $(pkgdatadir)/tests - -noinst_PROGRAMS = \ - $(HANG) \ - $(TESTS_testsuite) \ - $(NULL) - -igt_tests_bin_PROGRAMS = \ - gem_alive \
Quoted 8 lines
tests/Makefile.sources line 3
Quoted 8 lines
tests/Makefile.sources +0
-5- gem_stress \ - $(TESTS_progs) \ - $(TESTS_progs_M) \ - $(NULL) - NOUVEAU_TESTS_M = \ prime_nv_api \ prime_nv_pcopy \
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Thomas Wood
Prefix the test scripts and data variables with
dist_to ensure they are included in the distribution.Cc Joonas Lahtinen <[email protected]>
Comment below.
Quoted 31 lines
Signed-off-by Thomas Wood <[email protected]>--- tests/Makefile.am | 4 ++-- tests/Makefile.sources | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-)tests/Makefile.am +2
-2@@ -32,13 +32,13 @@ igt_tests_bin_PROGRAMS += \ $(TESTS_progs_M) \ $(NULL) -igt_tests_bin_SCRIPTS += \ +dist_igt_tests_bin_SCRIPTS = \ $(TESTS_scripts) \ $(TESTS_scripts_M) \ $(scripts) \ $(NULL) -igt_tests_data_DATA += \ +dist_igt_tests_data_DATA = \ $(IMAGES) \ $(NULL)tests/Makefile.sources +0
-0
tests/Makefile.sources igt_tests_bin_PROGRAMS = \ · line 21
Quoted 9 lines
tests/Makefile.sources +0
-6@@ -13,12 +13,6 @@ igt_tests_bin_PROGRAMS = \ $(TESTS_progs_M) \ $(NULL) -igt_tests_bin_SCRIPTS = \ - $(NULL) - -igt_tests_data_DATA = \ - $(NULL) -
I'd include the movement of the variables (and removal of +=) from the second patch to here and commit those parts already.
I seem to have myself missed that the fact that both places were adding same variables to it.
Regards, Joonas
tests/Makefile.sources igt_tests_bin_PROGRAMS = \ · line 18
Quoted 3 lines
tests/Makefile.sources +0
-0NOUVEAU_TESTS_M = \ prime_nv_api \ prime_nv_pcopy \
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx