[PATCH xserver] tests: Build test programs only when testing

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 13 02:32:44 UTC 2016


On Sun, Dec 11, 2016 at 07:45:44AM +0500, Mihail Konev wrote:
> Signed-off-by: Mihail Konev <k.mvc at ya.ru>
> ---
> In case it is the [exact] opposite of the effect intended
> (test linking of test programs on every build),
> should then this be conditioned as a ./configure option?

NAK, there's a reason we do that. If we only build them on testing, we're
quite likely to introduce build errors that no-one spots. This way even if
no-one runs the tests at least we know they build.

Cheers,
   Peter

> 
>  test/Makefile.am     | 2 +-
>  test/xi1/Makefile.am | 2 +-
>  test/xi2/Makefile.am | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/test/Makefile.am b/test/Makefile.am
> index 064e1c5b736f..58165aa69236 100644
> --- a/test/Makefile.am
> +++ b/test/Makefile.am
> @@ -12,7 +12,7 @@ endif
>  endif
>  check_LTLIBRARIES = libxservertest.la
>  
> -noinst_PROGRAMS = \
> +check_PROGRAMS = \
>  	simple-xinit \
>  	$(TEST_PROGS) \
>  	$(NULL)
> diff --git a/test/xi1/Makefile.am b/test/xi1/Makefile.am
> index 907fa7aea5f3..d0312b63f9a7 100644
> --- a/test/xi1/Makefile.am
> +++ b/test/xi1/Makefile.am
> @@ -1,6 +1,6 @@
>  if ENABLE_UNIT_TESTS
>  if HAVE_LD_WRAP
> -noinst_PROGRAMS =  \
> +check_PROGRAMS =  \
>  	protocol-xchangedevicecontrol
>  
>  TESTS=$(noinst_PROGRAMS)
> diff --git a/test/xi2/Makefile.am b/test/xi2/Makefile.am
> index bfddfef133fd..fc5169fc4010 100644
> --- a/test/xi2/Makefile.am
> +++ b/test/xi2/Makefile.am
> @@ -1,6 +1,6 @@
>  if ENABLE_UNIT_TESTS
>  if HAVE_LD_WRAP
> -noinst_PROGRAMS =  \
> +check_PROGRAMS =  \
>  	protocol-xiqueryversion \
>  	protocol-xiquerydevice \
>  	protocol-xiselectevents \
> -- 
> 2.9.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list