[libsoup] meson: Check for all Apache modules required for running tests
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] meson: Check for all Apache modules required for running tests
- Date: Fri, 31 Aug 2018 10:21:18 +0000 (UTC)
commit 81735cf96ffc8f4cda50da32ce456d2882bf991a
Author: Tomas Popela <tpopela redhat com>
Date: Fri Aug 31 10:39:35 2018 +0200
meson: Check for all Apache modules required for running tests
The names of the missing ones could be found in the meson log. Also
print a warning if anything that is needed for running all the tests is
missing.
get_apache_modules_dirs.py | 40 +++++++++++++++++++++++++++++++++++++++-
meson.build | 5 +++++
2 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/get_apache_modules_dirs.py b/get_apache_modules_dirs.py
index c2428a9c..b39c4043 100755
--- a/get_apache_modules_dirs.py
+++ b/get_apache_modules_dirs.py
@@ -39,6 +39,44 @@ def check_module(modules_path, module):
return os.path.isfile(module_path)
+def check_required_basic_modules(modules_path):
+
+ apache_required_modules = [
+ 'mod_alias',
+ 'mod_auth_basic',
+ 'mod_auth_digest',
+ 'mod_authn_core',
+ 'mod_authn_file',
+ 'mod_authz_core',
+ 'mod_authz_host',
+ 'mod_authz_user',
+ 'mod_dir',
+ 'mod_mime',
+ 'mod_mpm_prefork',
+ 'mod_proxy',
+ 'mod_proxy_http',
+ 'mod_proxy_connect'
+ ]
+
+ found = 0
+ not_found = []
+ for module_name in apache_required_modules:
+ if not check_module(modules_path, module_name + '.so'):
+ if found == 0:
+ return False
+ # If we found at least one module, continue and later report all the
+ # modules that we didn't find.
+ not_found.append(module_name)
+ else:
+ found += 1
+
+ if found < len(apache_required_modules):
+ print('Failed to find required Apache modules for running tests: ' + ', '.join(not_found),
file=sys.stderr)
+ return False
+
+ return True
+
+
def main():
"""Checks whether the required Apache modules are available and prints their
paths to stdout (values are separated by colons).
@@ -75,7 +113,7 @@ def main():
for mpm_suffix in ['', '-' + mpm]:
for modules_dir in ['', 'modules']:
modules_path = os.path.join(apache_prefix, lib_dir, httpd_dir + mpm_suffix, modules_dir)
- if check_module(modules_path, 'mod_auth_digest.so'):
+ if check_required_basic_modules(modules_path):
apache_modules_dir = modules_path
if check_module(modules_path, 'mod_ssl.so'):
apache_ssl_module_dir = modules_path
diff --git a/meson.build b/meson.build
index 6deda77d..f99b43fc 100644
--- a/meson.build
+++ b/meson.build
@@ -173,6 +173,11 @@ if have_apache
cdata.set('IF_HAVE_PHP_XMLRPC', have_php_xmlrpc ? '' : ';')
endif
+tests_ready = have_apache and have_php and have_php_xmlrpc
+if not tests_ready
+ warning('Some regression tests will not be compiled due to missing libraries or modules. Please check the
logs for more details.')
+endif
+
cdata.set('HAVE_CURL', find_program('curl', required : false).found())
##################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]