diff mbox

[i-g-t,2/2] lib/tests: use the "check_" prefix for tests

Message ID 1414603852-5024-2-git-send-email-thomas.wood@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Wood Oct. 29, 2014, 5:30 p.m. UTC
The "check_" prefix ensures the test programs are not installed and are
only built when "make check" is run.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
---
 lib/tests/Makefile.am      |  5 +----
 lib/tests/Makefile.sources | 12 ++++--------
 2 files changed, 5 insertions(+), 12 deletions(-)

Comments

Daniel Vetter Nov. 3, 2014, 12:39 p.m. UTC | #1
On Wed, Oct 29, 2014 at 05:30:52PM +0000, Thomas Wood wrote:
> The "check_" prefix ensures the test programs are not installed and are
> only built when "make check" is run.
> 
> Signed-off-by: Thomas Wood <thomas.wood@intel.com>

This was actually fairly intentional since when developing I always forget
to hit make check. And if I do I get pissed that make check _always_ runs
all the tests, which is annoying when developing/testing a specific
testcase.

So imo it's better to always build them, but not install them. Ok if I
revert this, or would that break distcheck again?
-Daniel
diff mbox

Patch

diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 765e3e5..78279fb 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -1,9 +1,6 @@ 
 include Makefile.sources
 
-EXTRA_PROGRAMS = $(TESTS_testsuite)
-EXTRA_DIST = $(TESTS_testsuite_scripts)
-
-CLEANFILES = $(EXTRA_PROGRAMS)
+EXTRA_DIST = $(check_SCRIPTS)
 
 AM_CFLAGS = $(DRM_CFLAGS) $(CWARNFLAGS) \
 	-I$(srcdir)/../.. \
diff --git a/lib/tests/Makefile.sources b/lib/tests/Makefile.sources
index b13314d..d64c89c 100644
--- a/lib/tests/Makefile.sources
+++ b/lib/tests/Makefile.sources
@@ -1,8 +1,4 @@ 
-noinst_PROGRAMS = \
-	$(TESTS_testsuite) \
-	$(NULL)
-
-TESTS_testsuite = \
+check_PROGRAMS = \
 	igt_no_exit \
 	igt_no_exit_list_only \
 	igt_fork_helper \
@@ -11,13 +7,13 @@  TESTS_testsuite = \
 	igt_simulation \
 	$(NULL)
 
-TESTS_testsuite_scripts = \
+check_SCRIPTS = \
 	igt_command_line.sh \
 	$(NULL)
 
 TESTS = \
-	$(TESTS_testsuite) \
-	$(TESTS_testsuite_scripts) \
+	$(check_PROGRAMS) \
+	$(check_SCRIPTS) \
 	$(NULL)
 
 # Test that exercise specific asserts in the test framework library and are