source: mod_gnutls/test/ @ 86cd5f6

asyncio mod_gnutls/0.11.0
Last change on this file since 86cd5f6 was ee6351d, checked in by Fiona Klute <fiona.klute@…>, 17 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
2import os
3import re
4import shutil
5import subprocess
[ee6351d]6from pathlib import Path
8required_modules = {'logio', 'unixd', 'log_config'}
[ee6351d]10apache2 = os.environ['APACHE2']
12result =[apache2, '-l'], check=True,
13                        stdout=subprocess.PIPE, text=True)
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(
22for mod in (required_modules - built_in_modules):
23    print(f'LoadModule\t{mod}_module\t${{AP_LIBEXECDIR}}/mod_{mod}.so')
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.