diff mbox

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

Message ID 1360014747-7227-1-git-send-email-rodrigo.vivi@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rodrigo Vivi Feb. 4, 2013, 9:52 p.m. UTC
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 <rodrigo.vivi@gmail.com>
---
 Makefile.am  |  6 +++++-
 configure.ac | 11 ++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

Comments

Lespiau, Damien Feb. 7, 2013, 9:52 p.m. UTC | #1
On Mon, Feb 04, 2013 at 07:52:27PM -0200, Rodrigo Vivi wrote:
> 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.

Sorry to be the party crasher here, but the patch doesn't seem to really
remove dependencies because the default action-if-not-found of
PKG_CHECK_MODULES will end the configure script. For instance

PKG_CHECK_MODULES(CAIRO, [cairo])

will end the configure script if cairo is not found.

What are the goals here? remove dependencies? which ones?

Hopefully not too wrong with that stupid FOSDEM flu :)
Ben Widawsky Feb. 7, 2013, 10:40 p.m. UTC | #2
On Thu, Feb 07, 2013 at 09:52:32PM +0000, Damien Lespiau wrote:
> On Mon, Feb 04, 2013 at 07:52:27PM -0200, Rodrigo Vivi wrote:
> > 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.
> 
> Sorry to be the party crasher here, but the patch doesn't seem to really
> remove dependencies because the default action-if-not-found of
> PKG_CHECK_MODULES will end the configure script. For instance
> 
> PKG_CHECK_MODULES(CAIRO, [cairo])
> 
> will end the configure script if cairo is not found.
> 
> What are the goals here? remove dependencies? which ones?
> 
> Hopefully not too wrong with that stupid FOSDEM flu :)
> 
> -- 
> Damien

Takashi asked for it, and reviewed it, so
http://en.wikipedia.org/wiki/Ostrich_algorithm?
Rodrigo Vivi Feb. 8, 2013, 11:48 a.m. UTC | #3
Apparently Cairo wasn't the main reason, beucase something at /libs
depends on Cairo as well. So cairo dependencie wasn't removed from
checks.
But now on, when including any dependencies used only for tests please
add pkg_check_modules only if tests build enalbed.


On Thu, Feb 7, 2013 at 8:40 PM, Ben Widawsky <ben@bwidawsk.net> wrote:
> On Thu, Feb 07, 2013 at 09:52:32PM +0000, Damien Lespiau wrote:
>> On Mon, Feb 04, 2013 at 07:52:27PM -0200, Rodrigo Vivi wrote:
>> > 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.
>>
>> Sorry to be the party crasher here, but the patch doesn't seem to really
>> remove dependencies because the default action-if-not-found of
>> PKG_CHECK_MODULES will end the configure script. For instance
>>
>> PKG_CHECK_MODULES(CAIRO, [cairo])
>>
>> will end the configure script if cairo is not found.
>>
>> What are the goals here? remove dependencies? which ones?
>>
>> Hopefully not too wrong with that stupid FOSDEM flu :)
>>
>> --
>> Damien
>
> Takashi asked for it, and reviewed it, so
> http://en.wikipedia.org/wiki/Ostrich_algorithm?
>
> --
> Ben Widawsky, Intel Open Source Technology Center



--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
diff mbox

Patch

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