Skip to contentSkip to conversation

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

PATCH In review Rodrigo Vivi 6 participants 8 messages Feb 4, 2013 – Feb 8, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 Makefile.am  |  6 +++++-
 configure.ac | 11 ++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
Makefile.am +5 -1
index 5ea0fd8..0dd615b 100644
@@ -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
 
configure.ac +10 -1
index 0ba7ce7..342544b 100644
@@ -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
Signature · 1 line
1.7.11.7
#1 lore raw

PATCH 1/1 Build: Add --disable-tests configure flag to avoid tests build - v2

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 spacin fixes and adjusted for new space rules.

Conflicts:
configure.ac

---
 Makefile.am  |  6 +++++-
 configure.ac | 11 ++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
Makefile.am +5 -1
index 5ea0fd8..0dd615b 100644
@@ -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
 
configure.ac +10 -1
index 1c56fa4..e66876c 100644
@@ -122,6 +122,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
@@ -129,7 +139,6 @@ AC_CONFIG_FILES([
 		 lib/Makefile
 		 man/Makefile
 		 scripts/Makefile
-		 tests/Makefile
 		 tools/Makefile
 		 debugger/Makefile
 		 debugger/system_routine/Makefile
Signature · 1 line
1.7.11.7
Acked-by on v1 1/1
#2 lore raw

Re: [PATCH] Build: Add --disable-tests configure flag to avoid tests build - v2

Dear Rodrigo,

Am Dienstag, den 05.02.2013, 16:17 -0200 schrieb Rodrigo Vivi:

Quoted 2 lines

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

Please do not use abbreviations which do not even show up in the top ten hits when searching for them in the Google search engine.

Quoted 4 lines

distributions by default avoiding adding more and more dependencies since we are improving and adding more and more tests.

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

For the subject line from git help format-pactch:

    $ git format-patch --subject-prefix="PATCH v2"
Quoted 4 lines

Conflicts:
configure.ac

As it is just locale for you, you can remove this, right?

Quoted 4 lines
---
 Makefile.am  |  6 +++++-
 configure.ac | 11 ++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

[…]

With the changes above,

Thanks,

Paul

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw

Re: [PATCH] Build: Add --disable-tests configure flag to avoid tests build - v2

In reply to Rodrigo Vivi

At Tue, 5 Feb 2013 16:17:54 -0200,

Quoted 7 lines · Rodrigo Vivi

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 spacin fixes and adjusted for new space rules.

/spacin/spacing/ ?

Thanks! We can drop one more patch from SLE package now ;)

Takashi

Quoted 69 lines

Conflicts:
configure.ac

---
 Makefile.am  |  6 +++++-
 configure.ac | 11 ++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
Makefile.am +5 -1
index 5ea0fd8..0dd615b 100644
@@ -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
 
configure.ac +10 -1
index 1c56fa4..e66876c 100644
@@ -122,6 +122,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
@@ -129,7 +139,6 @@ AC_CONFIG_FILES([
 		 lib/Makefile
 		 man/Makefile
 		 scripts/Makefile
-		 tests/Makefile
 		 tools/Makefile
 		 debugger/Makefile
 		 debugger/system_routine/Makefile
Signature · 6 lines
1.7.11.7

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Re: [PATCH] Build: Add --disable-tests configure flag to avoid tests build - v2

Quoted 8 lines · Takashi Iwai

At Tue, 5 Feb 2013 16:17:54 -0200,

Quoted 6 lines · Rodrigo Vivi

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.

Quoted 5 lines
Quoted 1 line

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

/spacin/spacing/ ?

Merged, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#5 lore raw
In reply to Rodrigo Vivi
Quoted 4 lines · Rodrigo Vivi

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 :)

Signature · 1 line
Damien
#6 lore raw
Quoted 10 lines · Damien Lespiau
Quoted 4 lines · Rodrigo Vivi

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

Quoted 10 lines

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 :)

Signature · 1 line
Damien

Takashi asked for it, and reviewed it, so
http://en.wikipedia.org/wiki/Ostrich_algorithm?

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
#7 lore raw

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.

Quoted 19 lines · Ben Widawsky
Quoted 18 lines · Damien Lespiau
Quoted 4 lines · Rodrigo Vivi

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 :)

Quoted 8 lines
Quoted 2 lines

--
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