* [Buildroot] [PATCH 0/2] package/wayland: disable building tests
@ 2017-03-05 10:56 Yann E. MORIN
2017-03-05 10:56 ` [Buildroot] [PATCH 1/2] package/wayland: drop non-existing configure option Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Yann E. MORIN @ 2017-03-05 10:56 UTC (permalink / raw)
To: buildroot
Hello All!
Building tests require a C++ compiler, while the rest of wayland is
entirely written in C.
This series adds an option to configure to disable building tests.
It also gets rid of an option that was removed back in 2015.
Regards,
Yann E. MORIN.
The following changes since commit 1558a93484b8f95153d64f90a688707f5aeb747f
DEVELOPERS: remove cosmo package (2017-03-04 15:35:01 +0100)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 59483ee76c501ec78cfbb2250c3fbcf02f6f7a85
package/wayland: don't build tests (2017-03-05 11:56:08 +0100)
----------------------------------------------------------------
Yann E. MORIN (2):
package/wayland: drop non-existing configure option
package/wayland: don't build tests
...002-configure-add-option-to-disable-tests.patch | 68 ++++++++++++++++++++++
package/wayland/wayland.mk | 6 +-
2 files changed, 73 insertions(+), 1 deletion(-)
create mode 100644 package/wayland/0002-configure-add-option-to-disable-tests.patch
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/2] package/wayland: drop non-existing configure option 2017-03-05 10:56 [Buildroot] [PATCH 0/2] package/wayland: disable building tests Yann E. MORIN @ 2017-03-05 10:56 ` Yann E. MORIN 2017-03-05 10:56 ` [Buildroot] [PATCH 2/2] package/wayland: don't build tests Yann E. MORIN 2017-03-05 15:35 ` [Buildroot] [PATCH 0/2] package/wayland: disable building tests Thomas Petazzoni 2 siblings, 0 replies; 6+ messages in thread From: Yann E. MORIN @ 2017-03-05 10:56 UTC (permalink / raw) To: buildroot --disable-scanner was removed back in 2015, so drop it. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- package/wayland/wayland.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/wayland/wayland.mk b/package/wayland/wayland.mk index 286871e..11fbce3 100644 --- a/package/wayland/wayland.mk +++ b/package/wayland/wayland.mk @@ -14,7 +14,7 @@ WAYLAND_DEPENDENCIES = host-pkgconf host-wayland expat libffi libxml2 HOST_WAYLAND_DEPENDENCIES = host-pkgconf host-expat host-libffi host-libxml2 # wayland-scanner is only needed for building, not on the target -WAYLAND_CONF_OPTS = --disable-scanner --with-host-scanner +WAYLAND_CONF_OPTS = --with-host-scanner # Remove the DTD from the target, it's not needed at runtime define WAYLAND_TARGET_CLEANUP -- 2.7.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/wayland: don't build tests 2017-03-05 10:56 [Buildroot] [PATCH 0/2] package/wayland: disable building tests Yann E. MORIN 2017-03-05 10:56 ` [Buildroot] [PATCH 1/2] package/wayland: drop non-existing configure option Yann E. MORIN @ 2017-03-05 10:56 ` Yann E. MORIN 2017-03-05 13:21 ` Thomas Petazzoni 2017-03-05 15:35 ` [Buildroot] [PATCH 0/2] package/wayland: disable building tests Thomas Petazzoni 2 siblings, 1 reply; 6+ messages in thread From: Yann E. MORIN @ 2017-03-05 10:56 UTC (permalink / raw) To: buildroot wayland is entirely written in C, except for a single test that is written in C++. Since we are not interested in running the tests on the target, add an option to configure to disable tests altogether. Fixes: http://autobuild.buildroot.org/results/291/291e0f1ea18004190ae5acd9bec147cacc3e4bda/ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- ...002-configure-add-option-to-disable-tests.patch | 68 ++++++++++++++++++++++ package/wayland/wayland.mk | 6 +- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 package/wayland/0002-configure-add-option-to-disable-tests.patch diff --git a/package/wayland/0002-configure-add-option-to-disable-tests.patch b/package/wayland/0002-configure-add-option-to-disable-tests.patch new file mode 100644 index 0000000..8c67d9a --- /dev/null +++ b/package/wayland/0002-configure-add-option-to-disable-tests.patch @@ -0,0 +1,68 @@ +From 33b025e04bf3fa94b74ea3325b3fd7c3f546bcb1 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" <yann.morin.1998@free.fr> +Date: Sun, 5 Mar 2017 10:06:02 +0100 +Subject: [PATCH] configure: add option to disable tests + +When building for a product, tests are not needed. + +Besides, one test requires a C++ compiler, which is not always +available. + +So, add an option to configure to disable building tests altogether. + +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> +--- +Patch submitted upstream: +https://lists.freedesktop.org/archives/wayland-devel/2017-March/033359.html +--- + Makefile.am | 3 ++- + configure.ac | 8 ++++++++ + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index d0c8bd3..9c2541d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -143,7 +143,7 @@ libwayland_cursor_la_CFLAGS = \ + -I$(top_srcdir)/src \ + -DICONDIR=\"$(ICONDIR)\" + +- ++if ENABLE_TESTS + built_test_programs = \ + array-test \ + client-test \ +@@ -258,6 +258,7 @@ os_wrappers_test_LDADD = libtest-runner.la + + exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c + exec_fd_leak_checker_LDADD = libtest-runner.la ++endif + + EXTRA_DIST += tests/scanner-test.sh \ + tests/data/example.xml \ +diff --git a/configure.ac b/configure.ac +index b583bef..96a5575 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -87,10 +87,18 @@ AC_ARG_ENABLE([dtd-validation], + [], + [enable_dtd_validation=yes]) + ++AC_ARG_ENABLE([tests], ++ [AC_HELP_STRING([--disable-tests], ++ [Disable compilation of test programs])], ++ [], ++ [enable_tests=yes]) ++ + AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes) + + AM_CONDITIONAL(ENABLE_LIBRARIES, test "x$enable_libraries" = xyes) + ++AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "yes") ++ + AC_ARG_WITH(icondir, [ --with-icondir=<dir> Look for cursor icons here], + [ ICONDIR=$withval], + [ ICONDIR=${datadir}/icons]) +-- +2.7.4 + diff --git a/package/wayland/wayland.mk b/package/wayland/wayland.mk index 11fbce3..bd1030e 100644 --- a/package/wayland/wayland.mk +++ b/package/wayland/wayland.mk @@ -13,8 +13,12 @@ WAYLAND_INSTALL_STAGING = YES WAYLAND_DEPENDENCIES = host-pkgconf host-wayland expat libffi libxml2 HOST_WAYLAND_DEPENDENCIES = host-pkgconf host-expat host-libffi host-libxml2 +# 0002-configure-add-option-to-disable-tests.patch +WAYLAND_AUTORECONF = YES + # wayland-scanner is only needed for building, not on the target -WAYLAND_CONF_OPTS = --with-host-scanner +WAYLAND_CONF_OPTS = --with-host-scanner --disable-tests +HOST_WAYLAND_CONF_OPTS = --disable-tests # Remove the DTD from the target, it's not needed at runtime define WAYLAND_TARGET_CLEANUP -- 2.7.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/wayland: don't build tests 2017-03-05 10:56 ` [Buildroot] [PATCH 2/2] package/wayland: don't build tests Yann E. MORIN @ 2017-03-05 13:21 ` Thomas Petazzoni 2017-03-05 13:46 ` Yann E. MORIN 0 siblings, 1 reply; 6+ messages in thread From: Thomas Petazzoni @ 2017-03-05 13:21 UTC (permalink / raw) To: buildroot Hello, On Sun, 5 Mar 2017 11:56:51 +0100, Yann E. MORIN wrote: > wayland is entirely written in C, except for a single test that is > written in C++. > > Since we are not interested in running the tests on the target, add an > option to configure to disable tests altogether. > > Fixes: > http://autobuild.buildroot.org/results/291/291e0f1ea18004190ae5acd9bec147cacc3e4bda/ > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> I think this solves our (Buildroot) immediate problem, but is not the completely correct fix for upstream. Indeed, if Wayland is trying to build some C++ code, it should use AC_PROG_CXX and then only try to build the C++ code if it found a C++ compiler. But well, this --disable-tests thing is definitely good enough for us, so I'll apply this. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/wayland: don't build tests 2017-03-05 13:21 ` Thomas Petazzoni @ 2017-03-05 13:46 ` Yann E. MORIN 0 siblings, 0 replies; 6+ messages in thread From: Yann E. MORIN @ 2017-03-05 13:46 UTC (permalink / raw) To: buildroot Thomas, All, On 2017-03-05 14:21 +0100, Thomas Petazzoni spake thusly: > Hello, > > On Sun, 5 Mar 2017 11:56:51 +0100, Yann E. MORIN wrote: > > wayland is entirely written in C, except for a single test that is > > written in C++. > > > > Since we are not interested in running the tests on the target, add an > > option to configure to disable tests altogether. > > > > Fixes: > > http://autobuild.buildroot.org/results/291/291e0f1ea18004190ae5acd9bec147cacc3e4bda/ > > > > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> > > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> > > I think this solves our (Buildroot) immediate problem, but is not the > completely correct fix for upstream. Indeed, if Wayland is trying to > build some C++ code, it should use AC_PROG_CXX and then only try to > build the C++ code if it found a C++ compiler. They do use AC_PROG_CXX: https://cgit.freedesktop.org/wayland/wayland/tree/configure.ac#n29 But please note the comment just a few lines below: https://cgit.freedesktop.org/wayland/wayland/tree/configure.ac#n33 # check if we have C++ compiler. This is hacky workaround, # for a reason why it is this way see # http://lists.gnu.org/archive/html/bug-autoconf/2010-05/msg00001.html have_cpp_compiler=yes if ! which "$CXX" &>/dev/null; then have_cpp_compiler=no fi AM_CONDITIONAL(ENABLE_CPP_TEST, test "x$have_cpp_compiler" = "xyes") Alas, this does not work, because CXX is set to 'false' so the which actually succeeds. One would need to actually call $CXX to see if it is working. I'll see to send another patch to this effect. Yet, I think this --disable-tests is also good to upstream. Regards, Yann E. MORIN. > But well, this --disable-tests thing is definitely good enough for us, > so I'll apply this. > > Thomas > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux and Kernel engineering > http://free-electrons.com -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 0/2] package/wayland: disable building tests 2017-03-05 10:56 [Buildroot] [PATCH 0/2] package/wayland: disable building tests Yann E. MORIN 2017-03-05 10:56 ` [Buildroot] [PATCH 1/2] package/wayland: drop non-existing configure option Yann E. MORIN 2017-03-05 10:56 ` [Buildroot] [PATCH 2/2] package/wayland: don't build tests Yann E. MORIN @ 2017-03-05 15:35 ` Thomas Petazzoni 2 siblings, 0 replies; 6+ messages in thread From: Thomas Petazzoni @ 2017-03-05 15:35 UTC (permalink / raw) To: buildroot Hello, On Sun, 5 Mar 2017 11:56:48 +0100, Yann E. MORIN wrote: > Yann E. MORIN (2): > package/wayland: drop non-existing configure option > package/wayland: don't build tests Applied, thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-05 15:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-03-05 10:56 [Buildroot] [PATCH 0/2] package/wayland: disable building tests Yann E. MORIN 2017-03-05 10:56 ` [Buildroot] [PATCH 1/2] package/wayland: drop non-existing configure option Yann E. MORIN 2017-03-05 10:56 ` [Buildroot] [PATCH 2/2] package/wayland: don't build tests Yann E. MORIN 2017-03-05 13:21 ` Thomas Petazzoni 2017-03-05 13:46 ` Yann E. MORIN 2017-03-05 15:35 ` [Buildroot] [PATCH 0/2] package/wayland: disable building tests Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox