Skip to contentSkip to conversation

tests: create files that list the available tests

PATCH In review Thomas Wood 2 participants 2 messages Apr 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: create files that list the available tests

Add Makefile targets to create two text files containing the list of available single and multi-test programs. This enables the tests to be enumerated without requiring the build system.

---
 tests/.gitignore  |  2 ++
 tests/Makefile.am | 14 +++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
tests/.gitignore +2 -0
index 8b94613..146bab0 100644
@@ -117,6 +117,7 @@ kms_pipe_crc_basic
 kms_plane
 kms_render
 kms_setmode
+multi-tests.txt
 pm_lpsp
 pm_pc8
 pm_psr
@@ -127,5 +128,6 @@ prime_nv_pcopy
 prime_nv_test
 prime_self_import
 prime_udl
+single-tests.txt
 template
 testdisplay
tests/Makefile.am +13 -1
index ba05eac..c26a3d0 100644
@@ -5,6 +5,8 @@ if HAVE_NOUVEAU
 endif
 
 if BUILD_TESTS
+all-local: single-tests.txt multi-tests.txt
+
 list-single-tests:
 	@echo TESTLIST
 	@echo ${single_kernel_tests}
@@ -15,10 +17,20 @@ list-multi-tests:
 	@echo ${multi_kernel_tests}
 	@echo END TESTLIST
 
+single-tests.txt:
+	@echo TESTLIST > $@
+	@echo ${single_kernel_tests} >> $@
+	@echo END TESTLIST >> $@
+
+multi-tests.txt:
+	@echo TESTLIST > $@
+	@echo ${multi_kernel_tests} >> $@
+	@echo END TESTLIST >> $@
+
 EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) $(TESTS_testsuite)
 EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) $(scripts) $(IMAGES) $(common_files)
 
-CLEANFILES = $(EXTRA_PROGRAMS)
+CLEANFILES = $(EXTRA_PROGRAMS) single-tests.txt multi-tests.txt
 
 AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \
 	-I$(srcdir)/.. \
Signature · 1 line
1.9.0
#1 lore raw
Quoted 5 lines · Thomas Wood

Add Makefile targets to create two text files containing the list of available single and multi-test programs. This enables the tests to be enumerated without requiring the build system.

Yay! Now once the piglit part is in I can finally stop breaking my igt builds with root files ;-)

Thanks, patch merged.
-Daniel

Quoted 66 lines
---
 tests/.gitignore  |  2 ++
 tests/Makefile.am | 14 +++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
tests/.gitignore +2 -0
index 8b94613..146bab0 100644
@@ -117,6 +117,7 @@ kms_pipe_crc_basic
 kms_plane
 kms_render
 kms_setmode
+multi-tests.txt
 pm_lpsp
 pm_pc8
 pm_psr
@@ -127,5 +128,6 @@ prime_nv_pcopy
 prime_nv_test
 prime_self_import
 prime_udl
+single-tests.txt
 template
 testdisplay
tests/Makefile.am +13 -1
index ba05eac..c26a3d0 100644
@@ -5,6 +5,8 @@ if HAVE_NOUVEAU
 endif
 
 if BUILD_TESTS
+all-local: single-tests.txt multi-tests.txt
+
 list-single-tests:
 	@echo TESTLIST
 	@echo ${single_kernel_tests}
@@ -15,10 +17,20 @@ list-multi-tests:
 	@echo ${multi_kernel_tests}
 	@echo END TESTLIST
 
+single-tests.txt:
+	@echo TESTLIST > $@
+	@echo ${single_kernel_tests} >> $@
+	@echo END TESTLIST >> $@
+
+multi-tests.txt:
+	@echo TESTLIST > $@
+	@echo ${multi_kernel_tests} >> $@
+	@echo END TESTLIST >> $@
+
 EXTRA_PROGRAMS = $(TESTS_progs) $(TESTS_progs_M) $(HANG) $(TESTS_testsuite)
 EXTRA_DIST = $(TESTS_scripts) $(TESTS_scripts_M) $(scripts) $(IMAGES) $(common_files)
 
-CLEANFILES = $(EXTRA_PROGRAMS)
+CLEANFILES = $(EXTRA_PROGRAMS) single-tests.txt multi-tests.txt
 
 AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \
 	-I$(srcdir)/.. \
Signature · 6 lines
1.9.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch