Build: Add --disable-tests configure flag to avoid tests build

Tests are still being built by default. However this request
came from OSVs in order to allow them to include i-g-t in their
distributions by default avoiding adding more and more dependencies
since we are improving and adding more and more tests.

v2: wait for Ben's spacing fixes and adjusted for new space rules.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Rodrigo Vivi 2013-02-05 16:17:54 -02:00 committed by Daniel Vetter
parent c75b8c60b5
commit 7c17072400
2 changed files with 15 additions and 2 deletions

View File

@ -21,12 +21,16 @@
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
SUBDIRS = lib man tools scripts tests benchmarks demos SUBDIRS = lib man tools scripts benchmarks demos
if BUILD_SHADER_DEBUGGER if BUILD_SHADER_DEBUGGER
SUBDIRS += debugger SUBDIRS += debugger
endif endif
if BUILD_TESTS
SUBDIRS += tests
endif
test: test:
${MAKE} -C tests test ${MAKE} -C tests test

View File

@ -122,6 +122,16 @@ AM_CONDITIONAL(BUILD_SHADER_DEBUGGER, [test "x$BUILD_SHADER_DEBUGGER" != xno])
XORG_TESTSET_CFLAG([THREAD_CFLAGS], [-pthread], [-mt]) XORG_TESTSET_CFLAG([THREAD_CFLAGS], [-pthread], [-mt])
AC_SUBST([THREAD_CFLAGS]) AC_SUBST([THREAD_CFLAGS])
AC_ARG_ENABLE(tests,
AS_HELP_STRING([--disable-tests],
[Disable tests build (default: enabled)]),
[BUILD_TESTS=$enableval], [BUILD_TESTS="yes"])
if test "x$BUILD_TESTS" = xyes; then
AC_DEFINE(BUILD_TESTS, 1, [Build tests])
AC_CONFIG_FILES([tests/Makefile])
fi
AM_CONDITIONAL(BUILD_TESTS, [test "x$BUILD_TESTS" = xyes])
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
benchmarks/Makefile benchmarks/Makefile
@ -129,7 +139,6 @@ AC_CONFIG_FILES([
lib/Makefile lib/Makefile
man/Makefile man/Makefile
scripts/Makefile scripts/Makefile
tests/Makefile
tools/Makefile tools/Makefile
debugger/Makefile debugger/Makefile
debugger/system_routine/Makefile debugger/system_routine/Makefile