summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2011-04-05 16:18:39 -0700
committerAaron Plattner <aplattner@nvidia.com>2011-04-12 15:25:24 -0700
commitd12f9c04388ce98953e8cfa75c40e7e3628ff573 (patch)
treec0efd5d8d4b2165c5dc5a1d33a5aa684ed9ec93f
parenteca137c2b3564d30cdd5b2e1a131f610b792c783 (diff)
Decouple the test suite from "make check"
The "check" target is run during "distcheck" after the test suite is built, so having it run the test suite itself means that the suite has to pass before a tarball can be distributed. Also, an unsuspecting developer attempting to create a tarball might accidentally run the test suite against his host X server, which is bad because some of the tests can have adverse effects. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
-rw-r--r--Makefile.am8
-rw-r--r--README6
2 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index b8de4974..87040d2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,18 +7,20 @@ tetexec.cfg:
@rm -f xts5/$@
@cd xts5 && $(MAKE) $(AM_MAKEFLAGS) $@
-# "make check" testing. Override the test set with scenario.
+# Helpers for running the test suite in-tree. Override the test set with
+# scenario.
scenario =
-check-local: check.sh
+run-tests: check.sh all
@if test -z "$$DISPLAY"; then \
echo "DISPLAY not set"; \
exit 1; \
fi
$(SHELL) $(builddir)/check.sh $(scenario)
+.PHONY: run-tests
# Helper target for testing subsets (test-Xopen, etc.)
test-%:
- @$(MAKE) $(AM_MAKEFLAGS) check scenario='$*'
+ @$(MAKE) $(AM_MAKEFLAGS) run-tests scenario='$*'
if HAVE_DOCTOOLS
miscmandir = $(MISC_MAN_DIR)
diff --git a/README b/README
index c74b17a8..d3baf50c 100644
--- a/README
+++ b/README
@@ -50,10 +50,10 @@ the build tree.
$ ./check.sh # run all the tests
$ ./check.sh XI # run just the XI test scenario
-The "make check" framework can also be used from the build tree.
+The "make run-tests" framework can also be used from the build tree.
- $ make check # run all the tests
- $ make check scenario=XI # run just the XI test scenario
+ $ make run-tests # run all the tests
+ $ make run-tests scenario=XI # run just the XI test scenario
$ make test-XI # shortcut for the previous
A wrapper script, xts-run, is the easiest way to run the installed tests.