[Spice-commits] 2 commits - configure.ac Makefile.am meson.build meson_options.txt

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 18 11:08:44 UTC 2019


 Makefile.am       |    6 +++++-
 configure.ac      |    7 +++++++
 meson.build       |    4 +++-
 meson_options.txt |    6 ++++++
 4 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 785ac8de4f86847d229d138ac5fc4898074d9cf4
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Date:   Sat Nov 16 10:41:59 2019 +0100

    meson: add tests option
    
    Allow the user to disable tests through -Dtests=false
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/meson.build b/meson.build
index 2e75e89..05091fb 100644
--- a/meson.build
+++ b/meson.build
@@ -166,7 +166,9 @@ add_project_arguments(compiler.get_supported_arguments(spice_common_global_cflag
 #
 subdir('python_modules')
 subdir('common')
-subdir('tests')
+if get_option('tests')
+  subdir('tests')
+endif
 subdir('docs')
 
 #
diff --git a/meson_options.txt b/meson_options.txt
index 84445fc..561460f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -47,3 +47,9 @@ option('generate-code',
     type : 'combo',
     choices : ['all', 'server', 'client'],
     description : 'Which code should be built')
+
+option('tests',
+    type : 'boolean',
+    value : true,
+    yield : true,
+    description : 'Enable SPICE tests')
commit 32beff2ff583cbabc2e88c62cd3e2074a3b75cda
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Date:   Fri Nov 15 11:36:14 2019 +0100

    configure.ac: add --enable-tests
    
    Allow the user to disable tests through --disable-tests, this is
    especially useful for example to disable gdk-pixbuf dependency
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/Makefile.am b/Makefile.am
index 5402499..00623a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,11 @@
 NULL =
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = python_modules common tests docs
+SUBDIRS = python_modules common docs
+
+if ENABLE_TESTS
+SUBDIRS += tests
+endif
 
 EXTRA_DIST =				\
 	meson.build			\
diff --git a/configure.ac b/configure.ac
index 9d10287..2dba7c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,6 +33,13 @@ AC_SEARCH_LIBS(regcomp, [regex rx])
 SPICE_CHECK_SYSDEPS
 SPICE_EXTRA_CHECKS
 
+AC_ARG_ENABLE([tests],
+  AS_HELP_STRING([--enable-tests],
+                 [Enable tests @<:@default=yes@:>@]),
+  [],
+  enable_tests="yes")
+AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")
+
 AC_ARG_ENABLE([alignment-checks],
   AS_HELP_STRING([--enable-alignment-checks],
                  [Enable runtime checks for cast alignment @<:@default=no@:>@]),


More information about the Spice-commits mailing list