2018-04-16 18:58:30 +02:00
|
|
|
From 55ae8e1103f4697bfa01a84301a6560b89de5248 Mon Sep 17 00:00:00 2001
|
2017-03-05 11:56:51 +01:00
|
|
|
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
2018-04-16 18:58:30 +02:00
|
|
|
Date: Mon, 16 Apr 2018 19:52:34 +0300
|
2017-03-05 11:56:51 +01:00
|
|
|
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>
|
2018-04-16 18:58:30 +02:00
|
|
|
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
|
|
Tested-by: Eric Engestrom <eric.engestrom@imgtec.com>
|
|
|
|
|
|
|
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
|
|
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
|
|
|
|
|
2017-03-05 11:56:51 +01:00
|
|
|
---
|
2018-04-16 18:58:30 +02:00
|
|
|
Changes v1 -> v2:
|
|
|
|
- fix typo in yes-check (Eric)
|
2017-03-05 11:56:51 +01:00
|
|
|
---
|
2018-04-16 18:58:30 +02:00
|
|
|
Makefile.am | 2 ++
|
2017-03-05 11:56:51 +01:00
|
|
|
configure.ac | 8 ++++++++
|
2018-04-16 18:58:30 +02:00
|
|
|
2 files changed, 10 insertions(+)
|
2017-03-05 11:56:51 +01:00
|
|
|
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
2018-04-16 18:58:30 +02:00
|
|
|
index 741db5ebf9d9..4862d42959f0 100644
|
2017-03-05 11:56:51 +01:00
|
|
|
--- a/Makefile.am
|
|
|
|
+++ b/Makefile.am
|
2018-04-16 18:58:30 +02:00
|
|
|
@@ -160,6 +160,7 @@ pkgconfig_DATA += egl/wayland-egl.pc
|
|
|
|
include_HEADERS += egl/wayland-egl-backend.h
|
|
|
|
pkgconfig_DATA += egl/wayland-egl-backend.pc
|
2017-03-05 11:56:51 +01:00
|
|
|
|
|
|
|
+if ENABLE_TESTS
|
|
|
|
built_test_programs = \
|
|
|
|
array-test \
|
|
|
|
client-test \
|
2018-04-16 18:58:30 +02:00
|
|
|
@@ -287,6 +288,7 @@ os_wrappers_test_LDADD = libtest-runner.la
|
2017-03-05 11:56:51 +01:00
|
|
|
|
|
|
|
exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c
|
2019-04-15 21:30:13 +02:00
|
|
|
exec_fd_leak_checker_LDADD = libtest-helpers.la
|
2017-03-05 11:56:51 +01:00
|
|
|
+endif
|
|
|
|
|
|
|
|
EXTRA_DIST += tests/scanner-test.sh \
|
2018-04-16 18:58:30 +02:00
|
|
|
protocol/tests.xml \
|
2017-03-05 11:56:51 +01:00
|
|
|
diff --git a/configure.ac b/configure.ac
|
2018-04-16 18:58:30 +02:00
|
|
|
index c74ee97b24a2..5c94b7b76b06 100644
|
2017-03-05 11:56:51 +01:00
|
|
|
--- a/configure.ac
|
|
|
|
+++ b/configure.ac
|
2018-04-16 18:58:30 +02:00
|
|
|
@@ -89,10 +89,18 @@ AC_ARG_ENABLE([dtd-validation],
|
2017-03-05 11:56:51 +01:00
|
|
|
[],
|
|
|
|
[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)
|
|
|
|
|
2018-04-16 18:58:30 +02:00
|
|
|
+AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = xyes)
|
2017-03-05 11:56:51 +01:00
|
|
|
+
|
|
|
|
AC_ARG_WITH(icondir, [ --with-icondir=<dir> Look for cursor icons here],
|
|
|
|
[ ICONDIR=$withval],
|
|
|
|
[ ICONDIR=${datadir}/icons])
|
|
|
|
--
|
2018-04-16 18:58:30 +02:00
|
|
|
2.14.3
|
2017-03-05 11:56:51 +01:00
|
|
|
|