[PATCH] Decouple the test suite from "make check"

Peter Hutterer peter.hutterer at who-t.net
Tue Apr 5 22:55:49 PDT 2011


On Tue, Apr 05, 2011 at 04:24:40PM -0700, Aaron Plattner wrote:
> 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 at nvidia.com>
> ---
>  Makefile.am |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index b8de497..87040d2 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)
> -- 
> 1.7.1

Acked-by: Peter Hutterer <peter.hutterer at who-t.net>

Cheers,
  Peter


More information about the xorg-devel mailing list