Allow to opt-out from building tests.

Since the tests are only useful either if you're hacking at pulseaudio as
a developer, or when running "make check", allow users to opt-out from
their build.

This for instance allows for Gentoo users not to build the tests when
installing the ebuild with tests disabled, and also allow for skipping over
eventually broken tests when trying to get the basic build going on a port.
This commit is contained in:
Diego E. 'Flameeyes' Pettenò 2009-01-20 00:55:39 +01:00
parent 8c4e2be05b
commit bd70e80531
2 changed files with 15 additions and 3 deletions

View file

@ -253,7 +253,7 @@ TESTS = \
lock-autospawn-test \
prioq-test
noinst_PROGRAMS = \
TESTS_BINARIES = \
mainloop-test \
mcalign-test \
pacat-simple \
@ -293,7 +293,7 @@ if HAVE_SIGXCPU
#TESTS += \
# cpulimit-test \
# cpulimit-test2
noinst_PROGRAMS += \
TESTS_BINARIES += \
cpulimit-test \
cpulimit-test2
endif
@ -301,10 +301,16 @@ endif
if HAVE_GLIB20
TESTS += \
mainloop-test-glib
noinst_PROGRAMS += \
TESTS_BINARIES += \
mainloop-test-glib
endif
if BUILD_TESTS_DEFAULT
noinst_PROGRAMS = $(TESTS_BINARIES)
else
check_PROGRAMS = $(TESTS_BINARIES)
endif
mainloop_test_SOURCES = tests/mainloop-test.c
mainloop_test_CFLAGS = $(AM_CFLAGS)
mainloop_test_LDADD = $(AM_LDADD) libpulse.la