source: mod_gnutls/test/required-modules.py @ d2f2f62

proxy-ticket
Last change on this file since d2f2f62 was ee6351d, checked in by Fiona Klute <fiona.klute@…>, 9 months ago

Test suite: Use mod_mpm_event by default

The "event" MPM module is more reliable, Valgrind tests showed
occasional mutex errors during shutdown in "worker". The tests still
fall back on the "worker" MPM if "event" is not available (that was
the case on Debian/HURD the last time I checked).

  • Property mode set to 100644
File size: 896 bytes
Line 
1#!/usr/bin/python3
2import os
3import re
4import shutil
5import subprocess
6from pathlib import Path
7
8required_modules = {'logio', 'unixd', 'log_config'}
9
10apache2 = os.environ['APACHE2']
11
12result = subprocess.run([apache2, '-l'], check=True,
13                        stdout=subprocess.PIPE, text=True)
14
15built_in_modules = set()
16mod_re = re.compile(r'^\s+mod_(\w+)\.c')
17for line in result.stdout.splitlines():
18    m = mod_re.match(line)
19    if m:
20        built_in_modules.add(m.group(1))
21
22for mod in (required_modules - built_in_modules):
23    print(f'LoadModule\t{mod}_module\t${{AP_LIBEXECDIR}}/mod_{mod}.so')
24
25# select mpm module, list is ordered by preference
26mpm_choices = ['event', 'worker']
27mod_dir = Path(os.environ['AP_LIBEXECDIR'])
28for mpm in mpm_choices:
29    mod = mod_dir.joinpath(f'mod_mpm_{mpm}.so')
30    if mod.exists():
31        print(f'LoadModule\tmpm_{mpm}_module\t{mod!s}')
32        break
Note: See TracBrowser for help on using the repository browser.