From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rodrigo Vivi Subject: [PATCH] Build: Add --disable-tests configure flag to avoid tests build. Date: Mon, 4 Feb 2013 19:52:27 -0200 Message-ID: <1360014747-7227-1-git-send-email-rodrigo.vivi@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ye0-f178.google.com (mail-ye0-f178.google.com [209.85.213.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A35FE6377 for ; Mon, 4 Feb 2013 13:57:22 -0800 (PST) Received: by mail-ye0-f178.google.com with SMTP id j12so1690508yeg.9 for ; Mon, 04 Feb 2013 13:57:21 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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. Signed-off-by: Rodrigo Vivi --- Makefile.am | 6 +++++- configure.ac | 11 ++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5ea0fd8..0dd615b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,12 +21,16 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -SUBDIRS = lib man tools scripts tests benchmarks demos +SUBDIRS = lib man tools scripts benchmarks demos if BUILD_SHADER_DEBUGGER SUBDIRS += debugger endif +if BUILD_TESTS +SUBDIRS += tests +endif + test: ${MAKE} -C tests test diff --git a/configure.ac b/configure.ac index 0ba7ce7..342544b 100644 --- a/configure.ac +++ b/configure.ac @@ -124,6 +124,16 @@ AM_CONDITIONAL(BUILD_SHADER_DEBUGGER, [test "x$BUILD_SHADER_DEBUGGER" != xno]) XORG_TESTSET_CFLAG([THREAD_CFLAGS], [-pthread], [-mt]) 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([ Makefile benchmarks/Makefile @@ -131,7 +141,6 @@ AC_CONFIG_FILES([ lib/Makefile man/Makefile scripts/Makefile - tests/Makefile tools/Makefile debugger/Makefile debugger/system_routine/Makefile -- 1.7.11.7