[libsoup] meson: Only compile and install test the have all the prerequisites
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] meson: Only compile and install test the have all the prerequisites
- Date: Wed, 18 Apr 2018 06:20:32 +0000 (UTC)
commit 964e13057e577820f9557df7fa7ced99c8a62c82
Author: Tomas Popela <tpopela redhat com>
Date: Tue Apr 17 11:33:02 2018 +0200
meson: Only compile and install test the have all the prerequisites
This is to avoid situations when you don't have Apache, but the test
that require Apache will be compiled and installed, the same applies for
xmlrpc.
https://bugzilla.gnome.org/show_bug.cgi?id=795324
tests/meson.build | 93 +++++++++++++++++++++++++++++-----------------------
1 files changed, 52 insertions(+), 41 deletions(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 10fda5d..c32a64c 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -14,12 +14,10 @@ test_resources = gnome.compile_resources('soup-tests',
# ['name', is_parallel]
tests = [
- ['auth', false],
['cache', true],
['chunk', true],
['chunk-io', true],
['coding', true],
- ['connection', false],
['context', true],
['continue', true],
['cookies', true],
@@ -30,9 +28,6 @@ tests = [
['multipart', true],
['no-ssl', true],
['ntlm', true],
- ['proxy', true],
- ['pull-api', false],
- ['range', false],
['redirect', true],
['requester', true],
['resource', true],
@@ -46,13 +41,60 @@ tests = [
['timeout', true],
['tld', true],
['uri-parsing', true],
- ['websocket', true],
- ['xmlrpc-old-server', true],
- ['xmlrpc-old', false],
- ['xmlrpc-server', true],
- ['xmlrpc', false]
+ ['websocket', true]
]
+if have_apache
+ tests += [
+ ['auth', false],
+ ['connection', false],
+ ['range', false],
+ ['proxy', true],
+ ['pull-api', false],
+ ]
+
+ configure_file(output : 'httpd.conf',
+ input : 'httpd.conf.in',
+ configuration : cdata)
+
+ # There is not copy_file() in Meson and this is official workaround as per
+ # https://github.com/mesonbuild/meson/issues/860
+ configure_file(input : 'htdigest',
+ output : 'htdigest',
+ configuration : configuration_data())
+ configure_file(input : 'htpasswd',
+ output : 'htpasswd',
+ configuration : configuration_data())
+ configure_file(input : 'index.txt',
+ output : 'index.txt',
+ configuration : configuration_data())
+ configure_file(input : 'test-cert.pem',
+ output : 'test-cert.pem',
+ configuration : configuration_data())
+ configure_file(input : 'test-key.pem',
+ output : 'test-key.pem',
+ configuration : configuration_data())
+endif
+
+if have_php
+ configure_file(output : 'php.ini',
+ input : 'php.ini.in',
+ configuration : cdata)
+endif
+
+if have_php_xmlrpc
+ tests += [
+ ['xmlrpc-old-server', true, have_php_xmlrpc],
+ ['xmlrpc-old', false, have_php_xmlrpc],
+ ['xmlrpc-server', true, have_php_xmlrpc],
+ ['xmlrpc', false, have_php_xmlrpc]
+ ]
+
+ configure_file(input : 'xmlrpc-server.php',
+ output : 'xmlrpc-server.php',
+ configuration : configuration_data())
+endif
+
env = environment()
env.set('G_TEST_SRCDIR', meson.current_source_dir())
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
@@ -72,34 +114,3 @@ endforeach
executable('ntlm-test-helper', 'ntlm-test-helper.c',
dependencies : [glib_dep, libsoup_dep])
-
-configure_file(output : 'httpd.conf',
- input : 'httpd.conf.in',
- configuration : cdata)
-
-if have_php
- configure_file(output : 'php.ini',
- input : 'php.ini.in',
- configuration : cdata)
-endif
-
-# There is not copy_file() in Meson and this is official workaround as per
-# https://github.com/mesonbuild/meson/issues/860
-configure_file(input : 'htdigest',
- output : 'htdigest',
- configuration : configuration_data())
-configure_file(input : 'htpasswd',
- output : 'htpasswd',
- configuration : configuration_data())
-configure_file(input : 'index.txt',
- output : 'index.txt',
- configuration : configuration_data())
-configure_file(input : 'test-cert.pem',
- output : 'test-cert.pem',
- configuration : configuration_data())
-configure_file(input : 'test-key.pem',
- output : 'test-key.pem',
- configuration : configuration_data())
-configure_file(input : 'xmlrpc-server.php',
- output : 'xmlrpc-server.php',
- configuration : configuration_data())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]