[PATCH] [wayland] configure: add option to disable tests
Yann E. MORIN
yann.morin.1998 at free.fr
Wed Mar 8 17:17:10 UTC 2017
Eric, All,
On 2017-03-08 14:50 +0000, Eric Engestrom spake thusly:
> On Sunday, 2017-03-05 11:53:18 +0100, Yann E. MORIN wrote:
> > 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 at free.fr>
> > ---
> > 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")
>
> `xyes` otherwise it'll never match, and you can drop the quotes :)
Doh, indeed. Weird I did not catch it. Unless... Arg, git status says it
has local uncomitted changes. And guess what, this about the xyes...
So I already fixed it locally but forgot to commit before sending.
Thanks for noticing!
> I think allowing to leave out tests is reasonable. I tested it a bit
> too, to make sure it doesn't break `make check` or `make distcheck`, so
> with the above fix, you can have my:
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> Tested-by: Eric Engestrom <eric.engestrom at imgtec.com>
I'll fix and respin. Thanks! :-)
Regards,
Yann E. MORIN.
> Cheers,
> Eric
>
> > +
> > AC_ARG_WITH(icondir, [ --with-icondir=<dir> Look for cursor icons here],
> > [ ICONDIR=$withval],
> > [ ICONDIR=${datadir}/icons])
> > --
> > 2.7.4
> >
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
More information about the wayland-devel
mailing list